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

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_views.cc

Issue 174013009: Add end to end test for Media galleries scan API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mock Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_ views.h" 5 #include "chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_ views.h"
6 6
7 #include "components/web_modal/web_contents_modal_dialog_host.h" 7 #include "components/web_modal/web_contents_modal_dialog_host.h"
8 #include "components/web_modal/web_contents_modal_dialog_manager.h" 8 #include "components/web_modal/web_contents_modal_dialog_manager.h"
9 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 9 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 if (context_menu_runner_->RunMenuAt( 319 if (context_menu_runner_->RunMenuAt(
320 GetWidget(), NULL, gfx::Rect(point.x(), point.y(), 0, 0), 320 GetWidget(), NULL, gfx::Rect(point.x(), point.y(), 0, 0),
321 views::MenuItemView::TOPLEFT, source_type, 321 views::MenuItemView::TOPLEFT, source_type,
322 views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == 322 views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
323 views::MenuRunner::MENU_DELETED) { 323 views::MenuRunner::MENU_DELETED) {
324 return; 324 return;
325 } 325 }
326 } 326 }
327 327
328 void MediaGalleriesScanResultDialogViews::AcceptDialogForTesting() {
329 accepted_ = true;
330
331 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager =
332 web_modal::WebContentsModalDialogManager::FromWebContents(
333 controller_->web_contents());
334 DCHECK(web_contents_modal_dialog_manager);
335 web_modal::WebContentsModalDialogManager::TestApi(
336 web_contents_modal_dialog_manager).CloseAllDialogs();
337 }
338
328 // MediaGalleriesScanResultDialogViewsController ------------------------------- 339 // MediaGalleriesScanResultDialogViewsController -------------------------------
329 340
330 // static 341 // static
331 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( 342 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create(
332 MediaGalleriesScanResultDialogController* controller) { 343 MediaGalleriesScanResultDialogController* controller) {
333 return new MediaGalleriesScanResultDialogViews(controller); 344 return new MediaGalleriesScanResultDialogViews(controller);
334 } 345 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698