Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "chrome/test/data/webui/a11y_audit_browsertest.h" | |
| 6 | |
| 7 #include "googleurl/src/gurl.h" | |
| 8 #include "testing/gtest/include/gtest/gtest.h" | |
| 9 | |
| 10 WebUIA11yAuditTest::WebUIA11yAuditTest() {} | |
| 11 | |
| 12 WebUIA11yAuditTest::~WebUIA11yAuditTest() {} | |
| 13 | |
| 14 IN_PROC_BROWSER_TEST_F(WebUIA11yAuditTest, testAuditFailuresCauseTestFailure) { | |
| 15 AddLibrary(FilePath(FILE_PATH_LITERAL( | |
|
dmazzoni
2012/12/14 18:45:41
Can you move most of these repeated lines to a com
aboxhall
2012/12/14 23:26:44
Actually, this file is no longer used. Removed.
| |
| 16 "chrome/test/data/webui/a11y_audit_browsertest.js"))); | |
| 17 set_preload_test_fixture("WebUIA11yAuditBrowserTest"); | |
| 18 set_preload_test_name("testWithAuditFailures"); | |
| 19 BrowsePreload(GURL("chrome://terms")); | |
| 20 ASSERT_FALSE(RunJavascriptTestF(false, | |
| 21 "WebUIA11yAuditBrowserTest", | |
| 22 "testWithAuditFailures")); | |
| 23 } | |
| 24 | |
| 25 IN_PROC_BROWSER_TEST_F(WebUIA11yAuditTest, testAuditCanBeDisabledInTest) { | |
| 26 AddLibrary(FilePath(FILE_PATH_LITERAL( | |
| 27 "chrome/test/data/webui/a11y_audit_browsertest.js"))); | |
| 28 set_preload_test_fixture("WebUIA11yAuditBrowserTest"); | |
| 29 set_preload_test_name("testWithAuditFailures_a11yChecksDisabled"); | |
| 30 BrowsePreload(GURL("chrome://terms")); | |
| 31 ASSERT_TRUE(RunJavascriptTestF(false, | |
| 32 "WebUIA11yAuditBrowserTest", | |
| 33 "testWithAuditFailures_a11yChecksDisabled")); | |
| 34 } | |
| 35 | |
| 36 IN_PROC_BROWSER_TEST_F(WebUIA11yAuditTest, | |
| 37 testAuditFailuresCauseTestFailure_TestsDisabledInFixture) { | |
| 38 AddLibrary(FilePath(FILE_PATH_LITERAL( | |
| 39 "chrome/test/data/webui/a11y_audit_browsertest.js"))); | |
| 40 set_preload_test_fixture("WebUIA11yAuditBrowserTest_TestsDisabledInFixture"); | |
| 41 set_preload_test_name("testWithAuditFailures"); | |
| 42 BrowsePreload(GURL("chrome://terms")); | |
| 43 ASSERT_FALSE(RunJavascriptTestF(false, | |
| 44 "WebUIA11yAuditBrowserTest_TestsDisabledInFixture", | |
| 45 "testWithAuditFailures")); | |
| 46 } | |
| 47 | |
| 48 IN_PROC_BROWSER_TEST_F(WebUIA11yAuditTest, testAuditCanBeDisabledInFixture) { | |
| 49 AddLibrary(FilePath(FILE_PATH_LITERAL( | |
| 50 "chrome/test/data/webui/a11y_audit_browsertest.js"))); | |
| 51 set_preload_test_fixture("WebUIA11yAuditBrowserTest_TestsDisabledInFixture"); | |
| 52 set_preload_test_name("testWithAuditFailures_a11yChecksNotEnabled"); | |
| 53 BrowsePreload(GURL("chrome://terms")); | |
| 54 ASSERT_TRUE(RunJavascriptTestF(false, | |
| 55 "WebUIA11yAuditBrowserTest_TestsDisabledInFixture", | |
| 56 "testWithAuditFailures_a11yChecksNotEnabled")); | |
| 57 } | |
| OLD | NEW |