OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 #include "chrome/test/ui_test_utils.h" |
6 | 7 |
7 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Overrides) { | 8 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OverrideNewtab) { |
8 // The first pass response is the creation of a new tab. | 9 ASSERT_TRUE(RunExtensionTest("override/newtab")) << message_; |
9 ASSERT_TRUE(RunExtensionTest("override")) << message_; | 10 { |
| 11 ResultCatcher catcher; |
| 12 // Navigate to the new tab page. The overridden new tab page |
| 13 // will call chrome.test.notifyPass() . |
| 14 ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab/")); |
| 15 ASSERT_TRUE(catcher.GetNextResult()); |
| 16 } |
10 | 17 |
11 // TODO(erikkay) load a second override and verify behavior, then unload | 18 // TODO(erikkay) Load a second extension with the same override. |
12 // the first and verify behavior, etc. | 19 // Verify behavior, then unload the first and verify behavior, etc. |
13 } | 20 } |
| 21 |
| 22 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OverrideHistory) { |
| 23 ASSERT_TRUE(RunExtensionTest("override/history")) << message_; |
| 24 { |
| 25 ResultCatcher catcher; |
| 26 // Navigate to the history page. The overridden history page |
| 27 // will call chrome.test.notifyPass() . |
| 28 ui_test_utils::NavigateToURL(browser(), GURL("chrome://history/")); |
| 29 ASSERT_TRUE(catcher.GetNextResult()); |
| 30 } |
| 31 } |
OLD | NEW |