OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault( | 228 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault( |
229 testing::Return(preferred_types)); | 229 testing::Return(preferred_types)); |
230 EXPECT_CALL(*service, GetAuthError()).WillRepeatedly( | 230 EXPECT_CALL(*service, GetAuthError()).WillRepeatedly( |
231 testing::ReturnRef(no_error)); | 231 testing::ReturnRef(no_error)); |
232 ON_CALL(*service, GetActiveDataTypes()).WillByDefault( | 232 ON_CALL(*service, GetActiveDataTypes()).WillByDefault( |
233 testing::Return(preferred_types)); | 233 testing::Return(preferred_types)); |
234 | 234 |
235 EXPECT_CALL(*service, AddObserver(testing::_)).Times(testing::AnyNumber()); | 235 EXPECT_CALL(*service, AddObserver(testing::_)).Times(testing::AnyNumber()); |
236 EXPECT_CALL(*service, RemoveObserver(testing::_)).Times(testing::AnyNumber()); | 236 EXPECT_CALL(*service, RemoveObserver(testing::_)).Times(testing::AnyNumber()); |
237 | 237 |
238 browser_ = new Browser(Browser::CreateParams(profile)); | 238 browser_ = new Browser(Browser::CreateParams(profile, true)); |
239 | 239 |
240 service->Initialize(); | 240 service->Initialize(); |
241 } | 241 } |
242 | 242 |
243 void ExtensionSessionsTest::CreateTestExtension() { | 243 void ExtensionSessionsTest::CreateTestExtension() { |
244 std::unique_ptr<base::DictionaryValue> test_extension_value( | 244 std::unique_ptr<base::DictionaryValue> test_extension_value( |
245 api_test_utils::ParseDictionary( | 245 api_test_utils::ParseDictionary( |
246 "{\"name\": \"Test\", \"version\": \"1.0\", " | 246 "{\"name\": \"Test\", \"version\": \"1.0\", " |
247 "\"permissions\": [\"sessions\", \"tabs\"]}")); | 247 "\"permissions\": [\"sessions\", \"tabs\"]}")); |
248 extension_ = api_test_utils::CreateExtension(test_extension_value.get()); | 248 extension_ = api_test_utils::CreateExtension(test_extension_value.get()); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 EXPECT_EQ(0u, sessions->GetSize()); | 380 EXPECT_EQ(0u, sessions->GetSize()); |
381 } | 381 } |
382 | 382 |
383 // http://crbug.com/251199 | 383 // http://crbug.com/251199 |
384 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_SessionsApis) { | 384 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_SessionsApis) { |
385 ASSERT_TRUE(RunExtensionSubtest("sessions", | 385 ASSERT_TRUE(RunExtensionSubtest("sessions", |
386 "sessions.html")) << message_; | 386 "sessions.html")) << message_; |
387 } | 387 } |
388 | 388 |
389 } // namespace extensions | 389 } // namespace extensions |
OLD | NEW |