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

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

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 years, 10 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 | Annotate | Revision Log
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 "chrome/browser/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 #include "chrome/browser/extensions/extension_service.h" 6 #include "chrome/browser/extensions/extension_service.h"
7 #include "chrome/browser/extensions/extension_system.h"
8 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
11 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
12 #include "content/public/browser/notification_service.h" 11 #include "content/public/browser/notification_service.h"
13 #include "content/public/test/browser_test_utils.h" 12 #include "content/public/test/browser_test_utils.h"
13 #include "extensions/browser/extension_system.h"
14 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
15 15
16 using extensions::Extension; 16 using extensions::Extension;
17 17
18 // Used to simulate a click on the first element named 'Options'. 18 // Used to simulate a click on the first element named 'Options'.
19 static const char kScriptClickOptionButton[] = 19 static const char kScriptClickOptionButton[] =
20 "(function() { " 20 "(function() { "
21 " var button = document.querySelector('.options-link');" 21 " var button = document.querySelector('.options-link');"
22 " button.click();" 22 " button.click();"
23 "})();"; 23 "})();";
(...skipping 23 matching lines...) Expand all
47 EXPECT_TRUE(content::ExecuteScriptInFrame( 47 EXPECT_TRUE(content::ExecuteScriptInFrame(
48 tab_strip->GetActiveWebContents(), 48 tab_strip->GetActiveWebContents(),
49 "//iframe[starts-with(@src, 'chrome://extension')]", 49 "//iframe[starts-with(@src, 'chrome://extension')]",
50 kScriptClickOptionButton)); 50 kScriptClickOptionButton));
51 observer.Wait(); 51 observer.Wait();
52 EXPECT_EQ(2, tab_strip->count()); 52 EXPECT_EQ(2, tab_strip->count());
53 53
54 EXPECT_EQ(extension->GetResourceURL("options.html"), 54 EXPECT_EQ(extension->GetResourceURL("options.html"),
55 tab_strip->GetWebContentsAt(1)->GetURL()); 55 tab_strip->GetWebContentsAt(1)->GetURL());
56 } 56 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/navigation_observer.cc ('k') | chrome/browser/extensions/page_action_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698