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

Side by Side Diff: chrome/browser/extensions/api/sessions/sessions_apitest.cc

Issue 1642583002: Fix bug with invalid chrome.sessions.onChanged listener. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 4 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 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 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 scoped_ptr<base::ListValue> result(utils::ToList( 380 scoped_ptr<base::ListValue> result(utils::ToList(
381 utils::RunFunctionAndReturnSingleResult( 381 utils::RunFunctionAndReturnSingleResult(
382 CreateFunction<SessionsGetRecentlyClosedFunction>(true).get(), 382 CreateFunction<SessionsGetRecentlyClosedFunction>(true).get(),
383 "[]", 383 "[]",
384 CreateIncognitoBrowser()))); 384 CreateIncognitoBrowser())));
385 ASSERT_TRUE(result); 385 ASSERT_TRUE(result);
386 base::ListValue* sessions = result.get(); 386 base::ListValue* sessions = result.get();
387 EXPECT_EQ(0u, sessions->GetSize()); 387 EXPECT_EQ(0u, sessions->GetSize());
388 } 388 }
389 389
390 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SessionsApisOnChanged) {
391 ASSERT_TRUE(RunExtensionSubtest("sessions/onchanged",
392 "onchanged.html",
393 kFlagEnableIncognito)) << message_;
394 }
395
390 // http://crbug.com/251199 396 // http://crbug.com/251199
391 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_SessionsApis) { 397 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_SessionsApis) {
392 #if defined(OS_WIN) && defined(USE_ASH) 398 #if defined(OS_WIN) && defined(USE_ASH)
393 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 399 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
394 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 400 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
395 switches::kAshBrowserTests)) 401 switches::kAshBrowserTests))
396 return; 402 return;
397 #endif 403 #endif
398 404
399 ASSERT_TRUE(RunExtensionSubtest("sessions", 405 ASSERT_TRUE(RunExtensionSubtest("sessions",
400 "sessions.html")) << message_; 406 "sessions.html")) << message_;
401 } 407 }
402 408
403 } // namespace 409 } // namespace
404 410
405 } // namespace extensions 411 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698