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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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 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/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
9 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
10 #include "base/run_loop.h" 9 #include "base/run_loop.h"
11 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/thread_task_runner_handle.h"
12 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
13 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 13 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
14 #include "chrome/browser/extensions/menu_manager.h" 14 #include "chrome/browser/extensions/menu_manager.h"
15 #include "chrome/browser/extensions/menu_manager_factory.h" 15 #include "chrome/browser/extensions/menu_manager_factory.h"
16 #include "chrome/browser/extensions/test_extension_environment.h" 16 #include "chrome/browser/extensions/test_extension_environment.h"
17 #include "chrome/browser/extensions/test_extension_prefs.h" 17 #include "chrome/browser/extensions/test_extension_prefs.h"
18 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 18 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
19 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 19 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
20 #include "chrome/browser/prefs/incognito_mode_prefs.h" 20 #include "chrome/browser/prefs/incognito_mode_prefs.h"
21 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h" 21 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 registry->RegisterDictionaryPref(prefs::kProxy); 383 registry->RegisterDictionaryPref(prefs::kProxy);
384 384
385 drp_test_context_->pref_service()->SetBoolean( 385 drp_test_context_->pref_service()->SetBoolean(
386 data_reduction_proxy::prefs::kDataReductionProxyEnabled, 386 data_reduction_proxy::prefs::kDataReductionProxyEnabled,
387 enable_data_reduction_proxy); 387 enable_data_reduction_proxy);
388 drp_test_context_->InitSettings(); 388 drp_test_context_->InitSettings();
389 389
390 settings->InitDataReductionProxySettings( 390 settings->InitDataReductionProxySettings(
391 drp_test_context_->io_data(), drp_test_context_->pref_service(), 391 drp_test_context_->io_data(), drp_test_context_->pref_service(),
392 drp_test_context_->request_context_getter(), 392 drp_test_context_->request_context_getter(),
393 base::MessageLoopProxy::current()); 393 base::ThreadTaskRunnerHandle::Get());
394 } 394 }
395 395
396 protected: 396 protected:
397 scoped_ptr<data_reduction_proxy::DataReductionProxyTestContext> 397 scoped_ptr<data_reduction_proxy::DataReductionProxyTestContext>
398 drp_test_context_; 398 drp_test_context_;
399 399
400 private: 400 private:
401 scoped_ptr<ProtocolHandlerRegistry> registry_; 401 scoped_ptr<ProtocolHandlerRegistry> registry_;
402 }; 402 };
403 403
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 params.properties[data_reduction_proxy::chrome_proxy_header()] = 478 params.properties[data_reduction_proxy::chrome_proxy_header()] =
479 data_reduction_proxy::chrome_proxy_lo_fi_directive(); 479 data_reduction_proxy::chrome_proxy_lo_fi_directive();
480 params.unfiltered_link_url = params.link_url; 480 params.unfiltered_link_url = params.link_url;
481 content::WebContents* wc = web_contents(); 481 content::WebContents* wc = web_contents();
482 scoped_ptr<TestRenderViewContextMenu> menu( 482 scoped_ptr<TestRenderViewContextMenu> menu(
483 new TestRenderViewContextMenu(wc->GetMainFrame(), params)); 483 new TestRenderViewContextMenu(wc->GetMainFrame(), params));
484 AppendImageItems(menu.get()); 484 AppendImageItems(menu.get());
485 485
486 ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_SHOW_ORIGINAL_IMAGE)); 486 ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_SHOW_ORIGINAL_IMAGE));
487 } 487 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698