Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: chrome/browser/extensions/active_tab_apitest.cc

Issue 25305002: Implement initial chrome.browserAction.openPopup API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to interactive_ui_test Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 25 matching lines...) Expand all
36 ui_test_utils::NavigateToURL( 36 ui_test_utils::NavigateToURL(
37 browser(), 37 browser(),
38 embedded_test_server()->GetURL( 38 embedded_test_server()->GetURL(
39 "/extensions/api_test/active_tab/page.html")); 39 "/extensions/api_test/active_tab/page.html"));
40 EXPECT_TRUE(catcher.GetNextResult()) << message_; 40 EXPECT_TRUE(catcher.GetNextResult()) << message_;
41 } 41 }
42 42
43 // Granting to the extension should give it access to page.html. 43 // Granting to the extension should give it access to page.html.
44 { 44 {
45 ResultCatcher catcher; 45 ResultCatcher catcher;
46 service->toolbar_model()->ExecuteBrowserAction(extension, browser(), NULL); 46 service->toolbar_model()->ExecuteBrowserAction(
47 extension, browser(), NULL, true);
47 EXPECT_TRUE(catcher.GetNextResult()) << message_; 48 EXPECT_TRUE(catcher.GetNextResult()) << message_;
48 } 49 }
49 50
50 // Changing page should go back to it not having access. 51 // Changing page should go back to it not having access.
51 { 52 {
52 ResultCatcher catcher; 53 ResultCatcher catcher;
53 ui_test_utils::NavigateToURL( 54 ui_test_utils::NavigateToURL(
54 browser(), 55 browser(),
55 embedded_test_server()->GetURL( 56 embedded_test_server()->GetURL(
56 "/extensions/api_test/active_tab/final_page.html")); 57 "/extensions/api_test/active_tab/final_page.html"));
57 EXPECT_TRUE(catcher.GetNextResult()) << message_; 58 EXPECT_TRUE(catcher.GetNextResult()) << message_;
58 } 59 }
59 } 60 }
60 61
61 } // namespace 62 } // namespace
62 } // namespace extensions 63 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698