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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api_unittest.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: We have both kinds of compile fixes: mac and windows Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/extensions/api/tabs/tabs_api.h" 7 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
8 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 8 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
9 #include "chrome/browser/extensions/extension_function_test_utils.h" 9 #include "chrome/browser/extensions/extension_function_test_utils.h"
10 #include "chrome/browser/extensions/extension_service_test_base.h" 10 #include "chrome/browser/extensions/extension_service_test_base.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 }; 61 };
62 62
63 void TabsApiUnitTest::SetUp() { 63 void TabsApiUnitTest::SetUp() {
64 ExtensionServiceTestBase::SetUp(); 64 ExtensionServiceTestBase::SetUp();
65 InitializeEmptyExtensionService(); 65 InitializeEmptyExtensionService();
66 66
67 if (content::IsBrowserSideNavigationEnabled()) 67 if (content::IsBrowserSideNavigationEnabled())
68 content::BrowserSideNavigationSetUp(); 68 content::BrowserSideNavigationSetUp();
69 69
70 browser_window_.reset(new TestBrowserWindow()); 70 browser_window_.reset(new TestBrowserWindow());
71 Browser::CreateParams params(profile()); 71 Browser::CreateParams params(profile(), true);
72 params.type = Browser::TYPE_TABBED; 72 params.type = Browser::TYPE_TABBED;
73 params.window = browser_window_.get(); 73 params.window = browser_window_.get();
74 browser_.reset(new Browser(params)); 74 browser_.reset(new Browser(params));
75 } 75 }
76 76
77 void TabsApiUnitTest::TearDown() { 77 void TabsApiUnitTest::TearDown() {
78 browser_.reset(); 78 browser_.reset();
79 browser_window_.reset(); 79 browser_window_.reset();
80 if (content::IsBrowserSideNavigationEnabled()) 80 if (content::IsBrowserSideNavigationEnabled())
81 content::BrowserSideNavigationTearDown(); 81 content::BrowserSideNavigationTearDown();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 function->set_extension(extension); 291 function->set_extension(extension);
292 const char* kArgs = R"(["", {"code": ""}])"; 292 const char* kArgs = R"(["", {"code": ""}])";
293 std::string error = extension_function_test_utils::RunFunctionAndReturnError( 293 std::string error = extension_function_test_utils::RunFunctionAndReturnError(
294 function.get(), kArgs, 294 function.get(), kArgs,
295 browser(), // browser() doesn't have any tabs. 295 browser(), // browser() doesn't have any tabs.
296 extension_function_test_utils::NONE); 296 extension_function_test_utils::NONE);
297 EXPECT_EQ(tabs_constants::kNoTabInBrowserWindowError, error); 297 EXPECT_EQ(tabs_constants::kNoTabInBrowserWindowError, error);
298 } 298 }
299 299
300 } // namespace extensions 300 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698