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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_sheet_controller_browsertest.mm

Issue 10855066: intents: Remove the disposition enum in web intents model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "chrome/test/base/in_process_browser_test.h" 6 #include "chrome/test/base/in_process_browser_test.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_tabstrip.h" 8 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h" 9 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h"
10 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" 10 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 ignore_result(picker_.release()); // Closing |picker_| will destruct it. 68 ignore_result(picker_.release()); // Closing |picker_| will destruct it.
69 } 69 }
70 70
71 IN_PROC_BROWSER_TEST_F(WebIntentSheetControllerBrowserTest, 71 IN_PROC_BROWSER_TEST_F(WebIntentSheetControllerBrowserTest,
72 DontCancelAfterServiceInvokation) { 72 DontCancelAfterServiceInvokation) {
73 CreateBubble(chrome::GetActiveTabContents(browser())); 73 CreateBubble(chrome::GetActiveTabContents(browser()));
74 74
75 GURL url; 75 GURL url;
76 model_.AddInstalledService(string16(), url, 76 model_.AddInstalledService(string16(), url,
77 WebIntentPickerModel::DISPOSITION_WINDOW); 77 webkit_glue::WebIntentServiceData::DISPOSITION_WINDOW);
78 78
79 EXPECT_CALL(delegate_, OnServiceChosen( 79 EXPECT_CALL(delegate_, OnServiceChosen(
80 url, WebIntentPickerModel::DISPOSITION_WINDOW)); 80 url, webkit_glue::WebIntentServiceData::DISPOSITION_WINDOW));
81 EXPECT_CALL(delegate_, OnPickerClosed()).Times(0); 81 EXPECT_CALL(delegate_, OnPickerClosed()).Times(0);
82 EXPECT_CALL(delegate_, OnClosing()); 82 EXPECT_CALL(delegate_, OnClosing());
83 83
84 picker_->OnServiceChosen(0); 84 picker_->OnServiceChosen(0);
85 picker_->Close(); 85 picker_->Close();
86 86
87 ignore_result(picker_.release()); // Closing |picker_| will destruct it. 87 ignore_result(picker_.release()); // Closing |picker_| will destruct it.
88 } 88 }
89 89
90 IN_PROC_BROWSER_TEST_F(WebIntentSheetControllerBrowserTest, 90 IN_PROC_BROWSER_TEST_F(WebIntentSheetControllerBrowserTest,
91 OnCancelledWillSignalClose) { 91 OnCancelledWillSignalClose) {
92 CreatePicker(); 92 CreatePicker();
93 EXPECT_CALL(delegate_, OnPickerClosed()); 93 EXPECT_CALL(delegate_, OnPickerClosed());
94 EXPECT_CALL(delegate_, OnClosing()); 94 EXPECT_CALL(delegate_, OnClosing());
95 picker_->OnCancelled(); 95 picker_->OnCancelled();
96 96
97 ignore_result(picker_.release()); // Closing |picker_| will destruct it. 97 ignore_result(picker_.release()); // Closing |picker_| will destruct it.
98 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698