Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / webui / bidi_checker_web_ui_test.cc
blob85b57d7ce14f9f904dd5811844e7717bbeaa83a6
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/bidi_checker_web_ui_test.h"
7 #include "base/base_paths.h"
8 #include "base/i18n/rtl.h"
9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/strings/utf_string_conversions.h"
13 #include "base/synchronization/waitable_event.h"
14 #include "base/threading/platform_thread.h"
15 #include "base/time/time.h"
16 #include "base/values.h"
17 #include "chrome/browser/autofill/personal_data_manager_factory.h"
18 #include "chrome/browser/history/history_service_factory.h"
19 #include "chrome/browser/prefs/session_startup_pref.h"
20 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/browser.h"
22 #include "chrome/common/url_constants.h"
23 #include "chrome/test/base/ui_test_utils.h"
24 #include "components/autofill/core/browser/autofill_profile.h"
25 #include "components/autofill/core/browser/autofill_test_utils.h"
26 #include "components/autofill/core/browser/personal_data_manager.h"
27 #include "components/history/core/browser/history_service.h"
28 #include "content/public/browser/browser_thread.h"
29 #include "ui/base/resource/resource_bundle.h"
31 using autofill::AutofillProfile;
32 using autofill::PersonalDataManager;
34 static const base::FilePath::CharType* kWebUIBidiCheckerLibraryJS =
35 FILE_PATH_LITERAL("third_party/bidichecker/bidichecker_packaged.js");
37 namespace {
38 base::FilePath WebUIBidiCheckerLibraryJSPath() {
39 base::FilePath src_root;
40 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_root))
41 LOG(ERROR) << "Couldn't find source root";
42 return src_root.Append(kWebUIBidiCheckerLibraryJS);
45 // Since synchronization isn't complete for the ResourceBundle class, reload
46 // locale resources on the IO thread.
47 // crbug.com/95425, crbug.com/132752
48 void ReloadLocaleResourcesOnIOThread(const std::string& new_locale) {
49 if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
50 LOG(ERROR)
51 << content::BrowserThread::IO
52 << " != " << base::PlatformThread::CurrentId();
53 NOTREACHED();
56 std::string locale;
58 base::ThreadRestrictions::ScopedAllowIO allow_io_scope;
59 locale.assign(
60 ResourceBundle::GetSharedInstance().ReloadLocaleResources(new_locale));
62 ASSERT_FALSE(locale.empty());
65 // Since synchronization isn't complete for the ResourceBundle class, reload
66 // locale resources on the IO thread.
67 // crbug.com/95425, crbug.com/132752
68 void ReloadLocaleResources(const std::string& new_locale) {
69 content::BrowserThread::PostTaskAndReply(
70 content::BrowserThread::IO,
71 FROM_HERE,
72 base::Bind(&ReloadLocaleResourcesOnIOThread, base::ConstRef(new_locale)),
73 base::MessageLoop::QuitClosure());
74 content::RunMessageLoop();
77 } // namespace
79 static const base::FilePath::CharType* kBidiCheckerTestsJS =
80 FILE_PATH_LITERAL("bidichecker_tests.js");
82 void WebUIBidiCheckerBrowserTest::SetUp() {
83 argv_ = base::CommandLine::ForCurrentProcess()->GetArgs();
86 void WebUIBidiCheckerBrowserTest::TearDown() {
87 // Reset command line to the way it was before the test was run.
88 base::CommandLine::ForCurrentProcess()->InitFromArgv(argv_);
91 WebUIBidiCheckerBrowserTest::~WebUIBidiCheckerBrowserTest() {}
93 WebUIBidiCheckerBrowserTest::WebUIBidiCheckerBrowserTest() {}
95 void WebUIBidiCheckerBrowserTest::SetUpInProcessBrowserTestFixture() {
96 WebUIBrowserTest::SetUpInProcessBrowserTestFixture();
97 WebUIBrowserTest::AddLibrary(WebUIBidiCheckerLibraryJSPath());
98 WebUIBrowserTest::AddLibrary(base::FilePath(kBidiCheckerTestsJS));
101 void WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(
102 const std::string& page_url, bool is_rtl) {
103 ui_test_utils::NavigateToURL(browser(), GURL(page_url));
104 ASSERT_TRUE(RunJavascriptTest("runBidiChecker",
105 new base::StringValue(page_url),
106 new base::FundamentalValue(is_rtl)));
109 void WebUIBidiCheckerBrowserTestLTR::RunBidiCheckerOnPage(
110 const std::string& page_url) {
111 WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(page_url, false);
114 void WebUIBidiCheckerBrowserTestRTL::RunBidiCheckerOnPage(
115 const std::string& page_url) {
116 WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(page_url, true);
119 void WebUIBidiCheckerBrowserTestRTL::SetUpOnMainThread() {
120 WebUIBidiCheckerBrowserTest::SetUpOnMainThread();
121 base::FilePath pak_path;
122 app_locale_ = base::i18n::GetConfiguredLocale();
123 ASSERT_TRUE(PathService::Get(base::FILE_MODULE, &pak_path));
124 pak_path = pak_path.DirName();
125 pak_path = pak_path.AppendASCII("pseudo_locales");
126 pak_path = pak_path.AppendASCII("fake-bidi");
127 pak_path = pak_path.ReplaceExtension(FILE_PATH_LITERAL("pak"));
128 ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(pak_path);
129 ReloadLocaleResources("he");
130 base::i18n::SetICUDefaultLocale("he");
133 void WebUIBidiCheckerBrowserTestRTL::TearDownOnMainThread() {
134 WebUIBidiCheckerBrowserTest::TearDownOnMainThread();
136 base::i18n::SetICUDefaultLocale(app_locale_);
137 ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(
138 base::FilePath());
139 ReloadLocaleResources(app_locale_);
142 // Tests
144 //==============================
145 // chrome://settings/history
146 //==============================
148 static void SetupHistoryPageTest(Browser* browser,
149 const std::string& page_url,
150 const std::string& page_title) {
151 history::HistoryService* history_service =
152 HistoryServiceFactory::GetForProfile(browser->profile(),
153 ServiceAccessType::IMPLICIT_ACCESS);
154 const GURL history_url = GURL(page_url);
155 history_service->AddPage(
156 history_url, base::Time::Now(), history::SOURCE_BROWSED);
157 history_service->SetPageTitle(history_url, base::UTF8ToUTF16(page_title));
160 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
161 TestHistoryPage) {
162 // Test an Israeli news site with a Hebrew title.
163 SetupHistoryPageTest(browser(),
164 "http://www.ynet.co.il",
165 "\xD7\x91\xD7\x93\xD7\x99\xD7\xA7\xD7\x94\x21");
166 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);
169 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
170 TestHistoryPage) {
171 SetupHistoryPageTest(browser(), "http://www.google.com", "Google");
172 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);
175 //==============================
176 // chrome://about
177 //==============================
179 // This page isn't localized to an RTL language so we test it only in English.
180 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestAboutPage) {
181 RunBidiCheckerOnPage(chrome::kChromeUIAboutURL);
184 //==============================
185 // chrome://crashes
186 //==============================
188 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestCrashesPage) {
189 RunBidiCheckerOnPage(chrome::kChromeUICrashesURL);
192 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestCrashesPage) {
193 RunBidiCheckerOnPage(chrome::kChromeUICrashesURL);
196 //==============================
197 // chrome://downloads
198 //==============================
200 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
201 TestDownloadsPageLTR) {
202 RunBidiCheckerOnPage(chrome::kChromeUIDownloadsURL);
205 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
206 TestDownloadsPageRTL) {
207 RunBidiCheckerOnPage(chrome::kChromeUIDownloadsURL);
210 //==============================
211 // chrome://newtab
212 //==============================
214 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestNewTabPage) {
215 RunBidiCheckerOnPage(chrome::kChromeUINewTabURL);
218 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestNewTabPage) {
219 RunBidiCheckerOnPage(chrome::kChromeUINewTabURL);
222 //==============================
223 // chrome://plugins
224 //==============================
226 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestPluginsPage) {
227 RunBidiCheckerOnPage(chrome::kChromeUIPluginsURL);
230 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestPluginsPage) {
231 RunBidiCheckerOnPage(chrome::kChromeUIPluginsURL);
234 //==============================
235 // chrome://settings-frame
236 //==============================
238 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestSettingsPage) {
239 RunBidiCheckerOnPage(chrome::kChromeUISettingsFrameURL);
242 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestSettingsPage) {
243 RunBidiCheckerOnPage(chrome::kChromeUISettingsFrameURL);
246 static void SetupSettingsAutofillPageTest(Profile* profile,
247 const char* first_name,
248 const char* middle_name,
249 const char* last_name,
250 const char* email,
251 const char* company,
252 const char* address1,
253 const char* address2,
254 const char* city,
255 const char* state,
256 const char* zipcode,
257 const char* country,
258 const char* phone) {
259 autofill::test::DisableSystemServices(profile->GetPrefs());
260 AutofillProfile autofill_profile;
261 autofill::test::SetProfileInfo(&autofill_profile,
262 first_name,
263 middle_name,
264 last_name,
265 email,
266 company,
267 address1,
268 address2,
269 city,
270 state,
271 zipcode,
272 country,
273 phone);
274 PersonalDataManager* personal_data_manager =
275 autofill::PersonalDataManagerFactory::GetForProfile(profile);
276 ASSERT_TRUE(personal_data_manager);
277 personal_data_manager->AddProfile(autofill_profile);
280 // http://crbug.com/94642
281 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
282 DISABLED_TestSettingsAutofillPage) {
283 SetupSettingsAutofillPageTest(browser()->profile(),
284 "\xD7\x9E\xD7\xA9\xD7\x94",
285 "\xD7\x91",
286 "\xD7\x9B\xD7\x94\xD7\x9F",
287 "moshe.b.cohen@biditest.com",
288 "\xD7\x91\xD7\x93\xD7\x99\xD7\xA7\xD7\x94\x20"
289 "\xD7\x91\xD7\xA2\xD7\x9E",
290 "\xD7\x93\xD7\xA8\xD7\x9A\x20\xD7\x9E\xD7\xA0"
291 "\xD7\x97\xD7\x9D\x20\xD7\x91\xD7\x92\xD7"
292 "\x99\xD7\x9F\x20\x32\x33",
293 "\xD7\xA7\xD7\x95\xD7\x9E\xD7\x94\x20\x32\x36",
294 "\xD7\xAA\xD7\x9C\x20\xD7\x90\xD7\x91\xD7\x99"
295 "\xD7\x91",
297 "66183",
298 "\xD7\x99\xD7\xA9\xD7\xA8\xD7\x90\xD7\x9C",
299 "0000");
300 std::string url(chrome::kChromeUISettingsFrameURL);
301 url += std::string(chrome::kAutofillSubPage);
302 RunBidiCheckerOnPage(url);
305 // http://crbug.com/94642
306 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
307 DISABLED_TestSettingsAutofillPage) {
308 SetupSettingsAutofillPageTest(browser()->profile(),
309 "Milton",
310 "C.",
311 "Waddams",
312 "red.swingline@initech.com",
313 "Initech",
314 "4120 Freidrich Lane",
315 "Basement",
316 "Austin",
317 "Texas",
318 "78744",
319 "United States",
320 "5125551234");
321 std::string url(chrome::kChromeUISettingsFrameURL);
322 url += std::string(chrome::kAutofillSubPage);
323 RunBidiCheckerOnPage(url);
326 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
327 TestSettingsClearBrowserDataPage) {
328 std::string url(chrome::kChromeUISettingsFrameURL);
329 url += std::string(chrome::kClearBrowserDataSubPage);
330 RunBidiCheckerOnPage(url);
333 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
334 TestSettingsClearBrowserDataPage) {
335 std::string url(chrome::kChromeUISettingsFrameURL);
336 url += std::string(chrome::kClearBrowserDataSubPage);
337 RunBidiCheckerOnPage(url);
340 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
341 TestSettingsContentSettingsPage) {
342 std::string url(chrome::kChromeUISettingsFrameURL);
343 url += std::string(chrome::kContentSettingsSubPage);
344 RunBidiCheckerOnPage(url);
347 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
348 TestSettingsContentSettingsPage) {
349 std::string url(chrome::kChromeUISettingsFrameURL);
350 url += std::string(chrome::kContentSettingsSubPage);
351 RunBidiCheckerOnPage(url);
354 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
355 TestSettingsContentSettingsExceptionsPage) {
356 std::string url(chrome::kChromeUISettingsFrameURL);
357 url += std::string(chrome::kContentSettingsExceptionsSubPage);
358 RunBidiCheckerOnPage(url);
361 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
362 TestSettingsContentSettingsExceptionsPage) {
363 std::string url(chrome::kChromeUISettingsFrameURL);
364 url += std::string(chrome::kContentSettingsExceptionsSubPage);
365 RunBidiCheckerOnPage(url);
368 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
369 TestSettingsLanguageOptionsPage) {
370 std::string url(chrome::kChromeUISettingsFrameURL);
371 url += std::string(chrome::kLanguageOptionsSubPage);
372 RunBidiCheckerOnPage(url);
375 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
376 TestSettingsLanguageOptionsPage) {
377 std::string url(chrome::kChromeUISettingsFrameURL);
378 url += std::string(chrome::kLanguageOptionsSubPage);
379 RunBidiCheckerOnPage(url);
382 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
383 TestSettingsSearchEnginesOptionsPage) {
384 std::string url(chrome::kChromeUISettingsFrameURL);
385 url += std::string(chrome::kSearchEnginesSubPage);
386 RunBidiCheckerOnPage(url);
389 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
390 TestSettingsSearchEnginesOptionsPage) {
391 std::string url(chrome::kChromeUISettingsFrameURL);
392 url += std::string(chrome::kSearchEnginesSubPage);
393 RunBidiCheckerOnPage(url);
396 //===================================
397 // chrome://settings-frame/startup
398 //===================================
400 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
401 TestSettingsFrameStartup) {
402 std::string url(chrome::kChromeUISettingsFrameURL);
403 url += "startup";
404 RunBidiCheckerOnPage(url);
407 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
408 TestSettingsFrameStartup) {
409 std::string url(chrome::kChromeUISettingsFrameURL);
410 url += "startup";
411 RunBidiCheckerOnPage(url);
414 //===================================
415 // chrome://settings-frame/importData
416 //===================================
418 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
419 TestSettingsFrameImportData) {
420 std::string url(chrome::kChromeUISettingsFrameURL);
421 url += chrome::kImportDataSubPage;
422 RunBidiCheckerOnPage(url);
425 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
426 TestSettingsFrameImportData) {
427 std::string url(chrome::kChromeUISettingsFrameURL);
428 url += chrome::kImportDataSubPage;
429 RunBidiCheckerOnPage(url);
432 //========================================
433 // chrome://settings-frame/manageProfile
434 //========================================
436 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
437 TestSettingsFrameMangageProfile) {
438 std::string url(chrome::kChromeUISettingsFrameURL);
439 url += chrome::kManageProfileSubPage;
440 RunBidiCheckerOnPage(url);
443 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
444 TestSettingsFrameMangageProfile) {
445 std::string url(chrome::kChromeUISettingsFrameURL);
446 url += chrome::kManageProfileSubPage;
447 RunBidiCheckerOnPage(url);
450 //===================================================
451 // chrome://settings-frame/contentExceptions#cookies
452 //===================================================
454 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
455 TestSettingsFrameContentExceptionsCookies) {
456 std::string url(chrome::kChromeUISettingsFrameURL);
457 url += chrome::kContentSettingsExceptionsSubPage;
458 url += "#cookies";
459 RunBidiCheckerOnPage(url);
462 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
463 TestSettingsFrameContentExceptionsCookies) {
464 std::string url(chrome::kChromeUISettingsFrameURL);
465 url += chrome::kContentSettingsExceptionsSubPage;
466 url += "#cookies";
467 RunBidiCheckerOnPage(url);
470 //===================================================
471 // chrome://settings-frame/contentExceptions#images
472 //===================================================
474 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
475 TestSettingsFrameContentExceptionsImages) {
476 std::string url(chrome::kChromeUISettingsFrameURL);
477 url += chrome::kContentSettingsExceptionsSubPage;
478 url += "#images";
479 RunBidiCheckerOnPage(url);
482 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
483 TestSettingsFrameContentExceptionsImages) {
484 std::string url(chrome::kChromeUISettingsFrameURL);
485 url += chrome::kContentSettingsExceptionsSubPage;
486 url += "#images";
487 RunBidiCheckerOnPage(url);
490 //======================================================
491 // chrome://settings-frame/contentExceptions#javascript
492 //======================================================
494 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
495 TestSettingsFrameContentExceptionsJavascript) {
496 std::string url(chrome::kChromeUISettingsFrameURL);
497 url += chrome::kContentSettingsExceptionsSubPage;
498 url += "#javascript";
499 RunBidiCheckerOnPage(url);
502 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
503 TestSettingsFrameContentExceptionsJavascript) {
504 std::string url(chrome::kChromeUISettingsFrameURL);
505 url += chrome::kContentSettingsExceptionsSubPage;
506 url += "#javascript";
507 RunBidiCheckerOnPage(url);
510 //===================================================
511 // chrome://settings-frame/contentExceptions#plugins
512 //===================================================
514 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
515 TestSettingsFrameContentExceptionsPlugins) {
516 std::string url(chrome::kChromeUISettingsFrameURL);
517 url += chrome::kContentSettingsExceptionsSubPage;
518 url += "#plugins";
519 RunBidiCheckerOnPage(url);
522 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
523 TestSettingsFrameContentExceptionsPlugins) {
524 std::string url(chrome::kChromeUISettingsFrameURL);
525 url += chrome::kContentSettingsExceptionsSubPage;
526 url += "#plugins";
527 RunBidiCheckerOnPage(url);
530 //===================================================
531 // chrome://settings-frame/contentExceptions#popups
532 //===================================================
534 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
535 TestSettingsFrameContentExceptionsPopups) {
536 std::string url(chrome::kChromeUISettingsFrameURL);
537 url += chrome::kContentSettingsExceptionsSubPage;
538 url += "#popups";
539 RunBidiCheckerOnPage(url);
542 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
543 TestSettingsFrameContentExceptionsPopups) {
544 std::string url(chrome::kChromeUISettingsFrameURL);
545 url += chrome::kContentSettingsExceptionsSubPage;
546 url += "#popups";
547 RunBidiCheckerOnPage(url);
550 //===================================================
551 // chrome://settings-frame/contentExceptions#location
552 //===================================================
554 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
555 TestSettingsFrameContentExceptionsLocation) {
556 std::string url(chrome::kChromeUISettingsFrameURL);
557 url += chrome::kContentSettingsExceptionsSubPage;
558 url += "#location";
559 RunBidiCheckerOnPage(url);
562 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
563 TestSettingsFrameContentExceptionsLocation) {
564 std::string url(chrome::kChromeUISettingsFrameURL);
565 url += chrome::kContentSettingsExceptionsSubPage;
566 url += "#location";
567 RunBidiCheckerOnPage(url);
570 //===================================================
571 // chrome://settings-frame/contentExceptions#notifications
572 //===================================================
574 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
575 TestSettingsFrameContentExceptionsNotifications) {
576 std::string url(chrome::kChromeUISettingsFrameURL);
577 url += chrome::kContentSettingsExceptionsSubPage;
578 url += "#notifications";
579 RunBidiCheckerOnPage(url);
582 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
583 TestSettingsFrameContentExceptionsNotifications) {
584 std::string url(chrome::kChromeUISettingsFrameURL);
585 url += chrome::kContentSettingsExceptionsSubPage;
586 url += "#notifications";
587 RunBidiCheckerOnPage(url);
590 //===================================================
591 // chrome://settings-frame/contentExceptions#mouselock
592 //===================================================
594 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
595 TestSettingsFrameContentExceptionsMouseLock) {
596 std::string url(chrome::kChromeUISettingsFrameURL);
597 url += chrome::kContentSettingsExceptionsSubPage;
598 url += "#mouselock";
599 RunBidiCheckerOnPage(url);
602 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
603 TestSettingsFrameContentExceptionsMouseLock) {
604 std::string url(chrome::kChromeUISettingsFrameURL);
605 url += chrome::kContentSettingsExceptionsSubPage;
606 url += "#mouselock";
607 RunBidiCheckerOnPage(url);
610 //========================================
611 // chrome://settings-frame/handlers
612 //========================================
614 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
615 TestSettingsFrameHandler) {
616 std::string url(chrome::kChromeUISettingsFrameURL);
617 url += chrome::kHandlerSettingsSubPage;
618 RunBidiCheckerOnPage(url);
621 // Fails on chromeos. http://crbug.com/125367
622 #if defined(OS_CHROMEOS)
623 #define MAYBE_TestSettingsFrameHandler DISABLED_TestSettingsFrameHandler
624 #else
625 #define MAYBE_TestSettingsFrameHandler TestSettingsFrameHandler
626 #endif
628 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
629 MAYBE_TestSettingsFrameHandler) {
630 std::string url(chrome::kChromeUISettingsFrameURL);
631 url += chrome::kHandlerSettingsSubPage;
632 RunBidiCheckerOnPage(url);
635 //========================================
636 // chrome://settings-frame/cookies
637 //========================================
639 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
640 TestSettingsFrameCookies) {
641 std::string url(chrome::kChromeUISettingsFrameURL);
642 url += "cookies";
643 RunBidiCheckerOnPage(url);
646 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
647 TestSettingsFrameCookies) {
648 std::string url(chrome::kChromeUISettingsFrameURL);
649 url += "cookies";
650 RunBidiCheckerOnPage(url);
653 //========================================
654 // chrome://settings-frame/passwords
655 //========================================
657 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
658 TestSettingsFramePasswords) {
659 std::string url(chrome::kChromeUISettingsFrameURL);
660 url += "passwords";
661 RunBidiCheckerOnPage(url);
664 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
665 TestSettingsFramePasswords) {
666 std::string url(chrome::kChromeUISettingsFrameURL);
667 url += "passwords";
668 RunBidiCheckerOnPage(url);
671 //========================================
672 // chrome://settings-frame/fonts
673 //========================================
675 #if defined(OS_MACOSX)
676 #define MAYBE_TestSettingsFrameFonts DISABLED_TestSettingsFrameFonts
677 #else
678 #define MAYBE_TestSettingsFrameFonts TestSettingsFrameFonts
679 #endif
680 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
681 MAYBE_TestSettingsFrameFonts) {
682 std::string url(chrome::kChromeUISettingsFrameURL);
683 url += "fonts";
684 RunBidiCheckerOnPage(url);
687 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
688 TestSettingsFrameFonts) {
689 std::string url(chrome::kChromeUISettingsFrameURL);
690 url += "fonts";
691 RunBidiCheckerOnPage(url);
694 // Test other uber iframes.
696 //==============================
697 // chrome://extensions-frame
698 //==============================
700 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestExtensionsFrame) {
701 RunBidiCheckerOnPage(chrome::kChromeUIExtensionsFrameURL);
704 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
705 TestExtensionsFrame) {
706 RunBidiCheckerOnPage(chrome::kChromeUIExtensionsFrameURL);
709 //==============================
710 // chrome://help-frame
711 //==============================
713 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHelpFrame) {
714 RunBidiCheckerOnPage(chrome::kChromeUIHelpFrameURL);
717 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHelpFrame) {
718 RunBidiCheckerOnPage(chrome::kChromeUIHelpFrameURL);
721 //==============================
722 // chrome://history-frame
723 //==============================
725 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) {
726 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);
729 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) {
730 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);