downloads: clicking "remove" on chrome://downloads should hide the shelf item.
[chromium-blink-merge.git] / chrome / browser / ui / webui / bidi_checker_web_ui_test.cc
blobb2e0f99b54d88ba6b2d71deca2d458b57acd5bf8
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.h"
19 #include "chrome/browser/history/history_service_factory.h"
20 #include "chrome/browser/prefs/session_startup_pref.h"
21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/ui/browser.h"
23 #include "chrome/common/url_constants.h"
24 #include "chrome/test/base/ui_test_utils.h"
25 #include "components/autofill/core/browser/autofill_profile.h"
26 #include "components/autofill/core/browser/autofill_test_utils.h"
27 #include "components/autofill/core/browser/personal_data_manager.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 HistoryService* history_service = HistoryServiceFactory::GetForProfile(
152 browser->profile(), ServiceAccessType::IMPLICIT_ACCESS);
153 const GURL history_url = GURL(page_url);
154 history_service->AddPage(
155 history_url, base::Time::Now(), history::SOURCE_BROWSED);
156 history_service->SetPageTitle(history_url, base::UTF8ToUTF16(page_title));
159 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
160 TestHistoryPage) {
161 // Test an Israeli news site with a Hebrew title.
162 SetupHistoryPageTest(browser(),
163 "http://www.ynet.co.il",
164 "\xD7\x91\xD7\x93\xD7\x99\xD7\xA7\xD7\x94\x21");
165 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);
168 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
169 TestHistoryPage) {
170 SetupHistoryPageTest(browser(), "http://www.google.com", "Google");
171 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);
174 //==============================
175 // chrome://about
176 //==============================
178 // This page isn't localized to an RTL language so we test it only in English.
179 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestAboutPage) {
180 RunBidiCheckerOnPage(chrome::kChromeUIAboutURL);
183 //==============================
184 // chrome://crashes
185 //==============================
187 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestCrashesPage) {
188 RunBidiCheckerOnPage(chrome::kChromeUICrashesURL);
191 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestCrashesPage) {
192 RunBidiCheckerOnPage(chrome::kChromeUICrashesURL);
195 //==============================
196 // chrome://downloads
197 //==============================
199 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
200 TestDownloadsPageLTR) {
201 RunBidiCheckerOnPage(chrome::kChromeUIDownloadsURL);
204 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
205 TestDownloadsPageRTL) {
206 RunBidiCheckerOnPage(chrome::kChromeUIDownloadsURL);
209 //==============================
210 // chrome://newtab
211 //==============================
213 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestNewTabPage) {
214 RunBidiCheckerOnPage(chrome::kChromeUINewTabURL);
217 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestNewTabPage) {
218 RunBidiCheckerOnPage(chrome::kChromeUINewTabURL);
221 //==============================
222 // chrome://plugins
223 //==============================
225 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestPluginsPage) {
226 RunBidiCheckerOnPage(chrome::kChromeUIPluginsURL);
229 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestPluginsPage) {
230 RunBidiCheckerOnPage(chrome::kChromeUIPluginsURL);
233 //==============================
234 // chrome://settings-frame
235 //==============================
237 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestSettingsPage) {
238 RunBidiCheckerOnPage(chrome::kChromeUISettingsFrameURL);
241 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestSettingsPage) {
242 RunBidiCheckerOnPage(chrome::kChromeUISettingsFrameURL);
245 static void SetupSettingsAutofillPageTest(Profile* profile,
246 const char* first_name,
247 const char* middle_name,
248 const char* last_name,
249 const char* email,
250 const char* company,
251 const char* address1,
252 const char* address2,
253 const char* city,
254 const char* state,
255 const char* zipcode,
256 const char* country,
257 const char* phone) {
258 autofill::test::DisableSystemServices(profile->GetPrefs());
259 AutofillProfile autofill_profile;
260 autofill::test::SetProfileInfo(&autofill_profile,
261 first_name,
262 middle_name,
263 last_name,
264 email,
265 company,
266 address1,
267 address2,
268 city,
269 state,
270 zipcode,
271 country,
272 phone);
273 PersonalDataManager* personal_data_manager =
274 autofill::PersonalDataManagerFactory::GetForProfile(profile);
275 ASSERT_TRUE(personal_data_manager);
276 personal_data_manager->AddProfile(autofill_profile);
279 // http://crbug.com/94642
280 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
281 DISABLED_TestSettingsAutofillPage) {
282 SetupSettingsAutofillPageTest(browser()->profile(),
283 "\xD7\x9E\xD7\xA9\xD7\x94",
284 "\xD7\x91",
285 "\xD7\x9B\xD7\x94\xD7\x9F",
286 "moshe.b.cohen@biditest.com",
287 "\xD7\x91\xD7\x93\xD7\x99\xD7\xA7\xD7\x94\x20"
288 "\xD7\x91\xD7\xA2\xD7\x9E",
289 "\xD7\x93\xD7\xA8\xD7\x9A\x20\xD7\x9E\xD7\xA0"
290 "\xD7\x97\xD7\x9D\x20\xD7\x91\xD7\x92\xD7"
291 "\x99\xD7\x9F\x20\x32\x33",
292 "\xD7\xA7\xD7\x95\xD7\x9E\xD7\x94\x20\x32\x36",
293 "\xD7\xAA\xD7\x9C\x20\xD7\x90\xD7\x91\xD7\x99"
294 "\xD7\x91",
296 "66183",
297 "\xD7\x99\xD7\xA9\xD7\xA8\xD7\x90\xD7\x9C",
298 "0000");
299 std::string url(chrome::kChromeUISettingsFrameURL);
300 url += std::string(chrome::kAutofillSubPage);
301 RunBidiCheckerOnPage(url);
304 // http://crbug.com/94642
305 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
306 DISABLED_TestSettingsAutofillPage) {
307 SetupSettingsAutofillPageTest(browser()->profile(),
308 "Milton",
309 "C.",
310 "Waddams",
311 "red.swingline@initech.com",
312 "Initech",
313 "4120 Freidrich Lane",
314 "Basement",
315 "Austin",
316 "Texas",
317 "78744",
318 "United States",
319 "5125551234");
320 std::string url(chrome::kChromeUISettingsFrameURL);
321 url += std::string(chrome::kAutofillSubPage);
322 RunBidiCheckerOnPage(url);
325 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
326 TestSettingsClearBrowserDataPage) {
327 std::string url(chrome::kChromeUISettingsFrameURL);
328 url += std::string(chrome::kClearBrowserDataSubPage);
329 RunBidiCheckerOnPage(url);
332 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
333 TestSettingsClearBrowserDataPage) {
334 std::string url(chrome::kChromeUISettingsFrameURL);
335 url += std::string(chrome::kClearBrowserDataSubPage);
336 RunBidiCheckerOnPage(url);
339 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
340 TestSettingsContentSettingsPage) {
341 std::string url(chrome::kChromeUISettingsFrameURL);
342 url += std::string(chrome::kContentSettingsSubPage);
343 RunBidiCheckerOnPage(url);
346 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
347 TestSettingsContentSettingsPage) {
348 std::string url(chrome::kChromeUISettingsFrameURL);
349 url += std::string(chrome::kContentSettingsSubPage);
350 RunBidiCheckerOnPage(url);
353 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
354 TestSettingsContentSettingsExceptionsPage) {
355 std::string url(chrome::kChromeUISettingsFrameURL);
356 url += std::string(chrome::kContentSettingsExceptionsSubPage);
357 RunBidiCheckerOnPage(url);
360 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
361 TestSettingsContentSettingsExceptionsPage) {
362 std::string url(chrome::kChromeUISettingsFrameURL);
363 url += std::string(chrome::kContentSettingsExceptionsSubPage);
364 RunBidiCheckerOnPage(url);
367 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
368 TestSettingsLanguageOptionsPage) {
369 std::string url(chrome::kChromeUISettingsFrameURL);
370 url += std::string(chrome::kLanguageOptionsSubPage);
371 RunBidiCheckerOnPage(url);
374 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
375 TestSettingsLanguageOptionsPage) {
376 std::string url(chrome::kChromeUISettingsFrameURL);
377 url += std::string(chrome::kLanguageOptionsSubPage);
378 RunBidiCheckerOnPage(url);
381 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
382 TestSettingsSearchEnginesOptionsPage) {
383 std::string url(chrome::kChromeUISettingsFrameURL);
384 url += std::string(chrome::kSearchEnginesSubPage);
385 RunBidiCheckerOnPage(url);
388 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
389 TestSettingsSearchEnginesOptionsPage) {
390 std::string url(chrome::kChromeUISettingsFrameURL);
391 url += std::string(chrome::kSearchEnginesSubPage);
392 RunBidiCheckerOnPage(url);
395 //===================================
396 // chrome://settings-frame/startup
397 //===================================
399 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
400 TestSettingsFrameStartup) {
401 std::string url(chrome::kChromeUISettingsFrameURL);
402 url += "startup";
403 RunBidiCheckerOnPage(url);
406 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
407 TestSettingsFrameStartup) {
408 std::string url(chrome::kChromeUISettingsFrameURL);
409 url += "startup";
410 RunBidiCheckerOnPage(url);
413 //===================================
414 // chrome://settings-frame/importData
415 //===================================
417 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
418 TestSettingsFrameImportData) {
419 std::string url(chrome::kChromeUISettingsFrameURL);
420 url += chrome::kImportDataSubPage;
421 RunBidiCheckerOnPage(url);
424 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
425 TestSettingsFrameImportData) {
426 std::string url(chrome::kChromeUISettingsFrameURL);
427 url += chrome::kImportDataSubPage;
428 RunBidiCheckerOnPage(url);
431 //========================================
432 // chrome://settings-frame/manageProfile
433 //========================================
435 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
436 TestSettingsFrameMangageProfile) {
437 std::string url(chrome::kChromeUISettingsFrameURL);
438 url += chrome::kManageProfileSubPage;
439 RunBidiCheckerOnPage(url);
442 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
443 TestSettingsFrameMangageProfile) {
444 std::string url(chrome::kChromeUISettingsFrameURL);
445 url += chrome::kManageProfileSubPage;
446 RunBidiCheckerOnPage(url);
449 //===================================================
450 // chrome://settings-frame/contentExceptions#cookies
451 //===================================================
453 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
454 TestSettingsFrameContentExceptionsCookies) {
455 std::string url(chrome::kChromeUISettingsFrameURL);
456 url += chrome::kContentSettingsExceptionsSubPage;
457 url += "#cookies";
458 RunBidiCheckerOnPage(url);
461 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
462 TestSettingsFrameContentExceptionsCookies) {
463 std::string url(chrome::kChromeUISettingsFrameURL);
464 url += chrome::kContentSettingsExceptionsSubPage;
465 url += "#cookies";
466 RunBidiCheckerOnPage(url);
469 //===================================================
470 // chrome://settings-frame/contentExceptions#images
471 //===================================================
473 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
474 TestSettingsFrameContentExceptionsImages) {
475 std::string url(chrome::kChromeUISettingsFrameURL);
476 url += chrome::kContentSettingsExceptionsSubPage;
477 url += "#images";
478 RunBidiCheckerOnPage(url);
481 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
482 TestSettingsFrameContentExceptionsImages) {
483 std::string url(chrome::kChromeUISettingsFrameURL);
484 url += chrome::kContentSettingsExceptionsSubPage;
485 url += "#images";
486 RunBidiCheckerOnPage(url);
489 //======================================================
490 // chrome://settings-frame/contentExceptions#javascript
491 //======================================================
493 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
494 TestSettingsFrameContentExceptionsJavascript) {
495 std::string url(chrome::kChromeUISettingsFrameURL);
496 url += chrome::kContentSettingsExceptionsSubPage;
497 url += "#javascript";
498 RunBidiCheckerOnPage(url);
501 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
502 TestSettingsFrameContentExceptionsJavascript) {
503 std::string url(chrome::kChromeUISettingsFrameURL);
504 url += chrome::kContentSettingsExceptionsSubPage;
505 url += "#javascript";
506 RunBidiCheckerOnPage(url);
509 //===================================================
510 // chrome://settings-frame/contentExceptions#plugins
511 //===================================================
513 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
514 TestSettingsFrameContentExceptionsPlugins) {
515 std::string url(chrome::kChromeUISettingsFrameURL);
516 url += chrome::kContentSettingsExceptionsSubPage;
517 url += "#plugins";
518 RunBidiCheckerOnPage(url);
521 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
522 TestSettingsFrameContentExceptionsPlugins) {
523 std::string url(chrome::kChromeUISettingsFrameURL);
524 url += chrome::kContentSettingsExceptionsSubPage;
525 url += "#plugins";
526 RunBidiCheckerOnPage(url);
529 //===================================================
530 // chrome://settings-frame/contentExceptions#popups
531 //===================================================
533 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
534 TestSettingsFrameContentExceptionsPopups) {
535 std::string url(chrome::kChromeUISettingsFrameURL);
536 url += chrome::kContentSettingsExceptionsSubPage;
537 url += "#popups";
538 RunBidiCheckerOnPage(url);
541 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
542 TestSettingsFrameContentExceptionsPopups) {
543 std::string url(chrome::kChromeUISettingsFrameURL);
544 url += chrome::kContentSettingsExceptionsSubPage;
545 url += "#popups";
546 RunBidiCheckerOnPage(url);
549 //===================================================
550 // chrome://settings-frame/contentExceptions#location
551 //===================================================
553 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
554 TestSettingsFrameContentExceptionsLocation) {
555 std::string url(chrome::kChromeUISettingsFrameURL);
556 url += chrome::kContentSettingsExceptionsSubPage;
557 url += "#location";
558 RunBidiCheckerOnPage(url);
561 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
562 TestSettingsFrameContentExceptionsLocation) {
563 std::string url(chrome::kChromeUISettingsFrameURL);
564 url += chrome::kContentSettingsExceptionsSubPage;
565 url += "#location";
566 RunBidiCheckerOnPage(url);
569 //===================================================
570 // chrome://settings-frame/contentExceptions#notifications
571 //===================================================
573 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
574 TestSettingsFrameContentExceptionsNotifications) {
575 std::string url(chrome::kChromeUISettingsFrameURL);
576 url += chrome::kContentSettingsExceptionsSubPage;
577 url += "#notifications";
578 RunBidiCheckerOnPage(url);
581 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
582 TestSettingsFrameContentExceptionsNotifications) {
583 std::string url(chrome::kChromeUISettingsFrameURL);
584 url += chrome::kContentSettingsExceptionsSubPage;
585 url += "#notifications";
586 RunBidiCheckerOnPage(url);
589 //===================================================
590 // chrome://settings-frame/contentExceptions#mouselock
591 //===================================================
593 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
594 TestSettingsFrameContentExceptionsMouseLock) {
595 std::string url(chrome::kChromeUISettingsFrameURL);
596 url += chrome::kContentSettingsExceptionsSubPage;
597 url += "#mouselock";
598 RunBidiCheckerOnPage(url);
601 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
602 TestSettingsFrameContentExceptionsMouseLock) {
603 std::string url(chrome::kChromeUISettingsFrameURL);
604 url += chrome::kContentSettingsExceptionsSubPage;
605 url += "#mouselock";
606 RunBidiCheckerOnPage(url);
609 //========================================
610 // chrome://settings-frame/handlers
611 //========================================
613 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
614 TestSettingsFrameHandler) {
615 std::string url(chrome::kChromeUISettingsFrameURL);
616 url += chrome::kHandlerSettingsSubPage;
617 RunBidiCheckerOnPage(url);
620 // Fails on chromeos. http://crbug.com/125367
621 #if defined(OS_CHROMEOS)
622 #define MAYBE_TestSettingsFrameHandler DISABLED_TestSettingsFrameHandler
623 #else
624 #define MAYBE_TestSettingsFrameHandler TestSettingsFrameHandler
625 #endif
627 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
628 MAYBE_TestSettingsFrameHandler) {
629 std::string url(chrome::kChromeUISettingsFrameURL);
630 url += chrome::kHandlerSettingsSubPage;
631 RunBidiCheckerOnPage(url);
634 //========================================
635 // chrome://settings-frame/cookies
636 //========================================
638 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
639 TestSettingsFrameCookies) {
640 std::string url(chrome::kChromeUISettingsFrameURL);
641 url += "cookies";
642 RunBidiCheckerOnPage(url);
645 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
646 TestSettingsFrameCookies) {
647 std::string url(chrome::kChromeUISettingsFrameURL);
648 url += "cookies";
649 RunBidiCheckerOnPage(url);
652 //========================================
653 // chrome://settings-frame/passwords
654 //========================================
656 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
657 TestSettingsFramePasswords) {
658 std::string url(chrome::kChromeUISettingsFrameURL);
659 url += "passwords";
660 RunBidiCheckerOnPage(url);
663 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
664 TestSettingsFramePasswords) {
665 std::string url(chrome::kChromeUISettingsFrameURL);
666 url += "passwords";
667 RunBidiCheckerOnPage(url);
670 //========================================
671 // chrome://settings-frame/fonts
672 //========================================
674 #if defined(OS_MACOSX)
675 #define MAYBE_TestSettingsFrameFonts DISABLED_TestSettingsFrameFonts
676 #else
677 #define MAYBE_TestSettingsFrameFonts TestSettingsFrameFonts
678 #endif
679 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR,
680 MAYBE_TestSettingsFrameFonts) {
681 std::string url(chrome::kChromeUISettingsFrameURL);
682 url += "fonts";
683 RunBidiCheckerOnPage(url);
686 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
687 TestSettingsFrameFonts) {
688 std::string url(chrome::kChromeUISettingsFrameURL);
689 url += "fonts";
690 RunBidiCheckerOnPage(url);
693 // Test other uber iframes.
695 //==============================
696 // chrome://extensions-frame
697 //==============================
699 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestExtensionsFrame) {
700 RunBidiCheckerOnPage(chrome::kChromeUIExtensionsFrameURL);
703 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL,
704 TestExtensionsFrame) {
705 RunBidiCheckerOnPage(chrome::kChromeUIExtensionsFrameURL);
708 //==============================
709 // chrome://help-frame
710 //==============================
712 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHelpFrame) {
713 RunBidiCheckerOnPage(chrome::kChromeUIHelpFrameURL);
716 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHelpFrame) {
717 RunBidiCheckerOnPage(chrome::kChromeUIHelpFrameURL);
720 //==============================
721 // chrome://history-frame
722 //==============================
724 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestLTR, TestHistoryFrame) {
725 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);
728 IN_PROC_BROWSER_TEST_F(WebUIBidiCheckerBrowserTestRTL, TestHistoryFrame) {
729 RunBidiCheckerOnPage(chrome::kChromeUIHistoryFrameURL);