Index: chrome/browser/resources/google_now/background_unittest.gtestjs |
diff --git a/chrome/browser/resources/google_now/background_unittest.gtestjs b/chrome/browser/resources/google_now/background_unittest.gtestjs |
index 64c799ed64681bb4582ebefd79725ddb6c435263..73712fb8241bbbac44ba6911b6d4ffe610f2f185 100644 |
--- a/chrome/browser/resources/google_now/background_unittest.gtestjs |
+++ b/chrome/browser/resources/google_now/background_unittest.gtestjs |
@@ -380,6 +380,7 @@ TEST_F('GoogleNowBackgroundUnitTest', 'Initialize_NoGeolocation', function() { |
function mockOnNotificationClickedDependencies(fixture) { |
fixture.makeAndRegisterMockApis([ |
'chrome.windows.create', |
+ 'chrome.windows.update', |
'instrumented.storage.local.get', |
'instrumented.tabs.create']); |
} |
@@ -486,7 +487,7 @@ TEST_F( |
notificationsData: {'TEST_ID': {actionUrls: testActionUrls}} |
}; |
var testActionUrl = 'http://testurl.com'; |
- var testCreatedTab = {}; |
+ var testCreatedTab = {windowId: 239}; |
mockOnNotificationClickedDependencies(this); |
this.makeMockLocalFunctions(['selector']); |
@@ -505,6 +506,9 @@ TEST_F( |
chromeTabsCreateSavedArgs.match(eqJSON({url: testActionUrl})), |
chromeTabsCreateSavedArgs.match(ANYTHING)). |
will(invokeCallback(chromeTabsCreateSavedArgs, 1, testCreatedTab)); |
+ this.mockApis.expects(once()).chrome_windows_update( |
+ testCreatedTab.windowId, |
+ eqJSON({focused: true})); |
// Invoking the tested function. |
onNotificationClicked( |
@@ -546,7 +550,7 @@ TEST_F( |
chromeTabsCreateSavedArgs.match(ANYTHING)). |
will(invokeCallback(chromeTabsCreateSavedArgs, 1, testCreatedTab)); |
this.mockApis.expects(once()).chrome_windows_create( |
- eqJSON({url: testActionUrl})); |
+ eqJSON({url: testActionUrl, focused: true})); |
// Invoking the tested function. |
onNotificationClicked( |