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

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

Issue 20593003: Move kEnableExperimentalExtensionApis switch to extensions/common/switches.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
10 #include "chrome/browser/bookmarks/bookmark_utils.h" 10 #include "chrome/browser/bookmarks/bookmark_utils.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 scoped_ptr<LazyBackgroundObserver> original_complete_; 71 scoped_ptr<LazyBackgroundObserver> original_complete_;
72 scoped_ptr<LazyBackgroundObserver> incognito_complete_; 72 scoped_ptr<LazyBackgroundObserver> incognito_complete_;
73 }; 73 };
74 74
75 } // namespace 75 } // namespace
76 76
77 class LazyBackgroundPageApiTest : public ExtensionApiTest { 77 class LazyBackgroundPageApiTest : public ExtensionApiTest {
78 public: 78 public:
79 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 79 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
80 ExtensionApiTest::SetUpCommandLine(command_line); 80 ExtensionApiTest::SetUpCommandLine(command_line);
81 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
82 // Set shorter delays to prevent test timeouts. 81 // Set shorter delays to prevent test timeouts.
83 command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1"); 82 command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1");
84 command_line->AppendSwitchASCII(switches::kEventPageSuspendingTime, "1"); 83 command_line->AppendSwitchASCII(switches::kEventPageSuspendingTime, "1");
85 } 84 }
86 85
87 // Loads the extension, which temporarily starts the lazy background page 86 // Loads the extension, which temporarily starts the lazy background page
88 // to dispatch the onInstalled event. We wait until it shuts down again. 87 // to dispatch the onInstalled event. We wait until it shuts down again.
89 const Extension* LoadExtensionAndWait(const std::string& test_name) { 88 const Extension* LoadExtensionAndWait(const std::string& test_name) {
90 LazyBackgroundObserver page_complete; 89 LazyBackgroundObserver page_complete;
91 base::FilePath extdir = test_data_dir_.AppendASCII("lazy_background_page"). 90 base::FilePath extdir = test_data_dir_.AppendASCII("lazy_background_page").
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 453
455 EXPECT_TRUE(event_page_ready.WaitUntilSatisfied()); 454 EXPECT_TRUE(event_page_ready.WaitUntilSatisfied());
456 455
457 page_ready.Reply("go"); 456 page_ready.Reply("go");
458 457
459 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 458 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
460 } 459 }
461 460
462 // TODO: background page with timer. 461 // TODO: background page with timer.
463 // TODO: background page that interacts with popup. 462 // TODO: background page that interacts with popup.
OLDNEW
« no previous file with comments | « chrome/browser/extensions/isolated_app_browsertest.cc ('k') | chrome/browser/extensions/platform_app_browsertest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698