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

Side by Side Diff: chrome/browser/extensions/api/permissions/permissions_api_unittest.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT 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/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "chrome/browser/extensions/api/permissions/permissions_api.h" 6 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
7 #include "chrome/browser/extensions/extension_api_unittest.h" 7 #include "chrome/browser/extensions/extension_api_unittest.h"
8 #include "chrome/browser/extensions/extension_function_test_utils.h" 8 #include "chrome/browser/extensions/extension_function_test_utils.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_service_test_with_install.h" 10 #include "chrome/browser/extensions/extension_service_test_with_install.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 EXPECT_TRUE(function->GetResultList()->GetBoolean(0u, &has_permission)); 67 EXPECT_TRUE(function->GetResultList()->GetBoolean(0u, &has_permission));
68 return has_permission; 68 return has_permission;
69 } 69 }
70 70
71 private: 71 private:
72 // ExtensionServiceTestBase: 72 // ExtensionServiceTestBase:
73 void SetUp() override { 73 void SetUp() override {
74 ExtensionServiceTestWithInstall::SetUp(); 74 ExtensionServiceTestWithInstall::SetUp();
75 InitializeEmptyExtensionService(); 75 InitializeEmptyExtensionService();
76 browser_window_.reset(new TestBrowserWindow()); 76 browser_window_.reset(new TestBrowserWindow());
77 Browser::CreateParams params(profile()); 77 Browser::CreateParams params(profile(), true);
78 params.type = Browser::TYPE_TABBED; 78 params.type = Browser::TYPE_TABBED;
79 params.window = browser_window_.get(); 79 params.window = browser_window_.get();
80 browser_.reset(new Browser(params)); 80 browser_.reset(new Browser(params));
81 } 81 }
82 // ExtensionServiceTestBase: 82 // ExtensionServiceTestBase:
83 void TearDown() override { 83 void TearDown() override {
84 browser_.reset(); 84 browser_.reset();
85 browser_window_.reset(); 85 browser_window_.reset();
86 ExtensionServiceTestWithInstall::TearDown(); 86 ExtensionServiceTestWithInstall::TearDown();
87 } 87 }
(...skipping 27 matching lines...) Expand all
115 115
116 // 4. Same as #3, but this time with file access allowed. 116 // 4. Same as #3, but this time with file access allowed.
117 expected_has_permission = true; 117 expected_has_permission = true;
118 has_permission = 118 has_permission =
119 RunContainsFunction("file:///*", "[{\"origins\":[\"file:///*\"]}]", 119 RunContainsFunction("file:///*", "[{\"origins\":[\"file:///*\"]}]",
120 true /* allow_file_access */); 120 true /* allow_file_access */);
121 EXPECT_EQ(expected_has_permission, has_permission); 121 EXPECT_EQ(expected_has_permission, has_permission);
122 } 122 }
123 123
124 } // namespace extensions 124 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698