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

Unified Diff: ash/metrics/pointer_metrics_recorder_unittest.cc

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus ash] Removes WmWindow from ash (rebase, nits and cleanup of use of ResizeHandleWindowTargeter) Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/metrics/pointer_metrics_recorder.cc ('k') | ash/metrics/user_metrics_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/metrics/pointer_metrics_recorder_unittest.cc
diff --git a/ash/metrics/pointer_metrics_recorder_unittest.cc b/ash/metrics/pointer_metrics_recorder_unittest.cc
index 4a8212ef765d5d681414616057e8d3a87be4bf2b..3112ba5e97edd7955b3bb013970d907f11e181c2 100644
--- a/ash/metrics/pointer_metrics_recorder_unittest.cc
+++ b/ash/metrics/pointer_metrics_recorder_unittest.cc
@@ -9,8 +9,9 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
-#include "ash/wm_window.h"
#include "base/test/histogram_tester.h"
+#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/window.h"
#include "ui/events/event.h"
#include "ui/views/pointer_watcher.h"
#include "ui/views/widget/widget.h"
@@ -158,25 +159,29 @@ TEST_F(PointerMetricsRecorderTest, DownEventPerDestination) {
ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE, 0),
base::TimeTicks());
- WmWindow* window = WmWindow::Get(target->GetNativeWindow());
+ aura::Window* window = target->GetNativeWindow();
CHECK(window);
- window->SetAppType(static_cast<int>(AppType::OTHERS));
+ window->SetProperty(aura::client::kAppType,
+ static_cast<int>(AppType::OTHERS));
pointer_metrics_recorder_->OnPointerEventObserved(pointer_event, gfx::Point(),
target.get());
histogram_tester_->ExpectBucketCount(kDestinationHistogramName, 0, 1);
- window->SetAppType(static_cast<int>(AppType::BROWSER));
+ window->SetProperty(aura::client::kAppType,
+ static_cast<int>(AppType::BROWSER));
pointer_metrics_recorder_->OnPointerEventObserved(pointer_event, gfx::Point(),
target.get());
histogram_tester_->ExpectBucketCount(kDestinationHistogramName, 1, 1);
- window->SetAppType(static_cast<int>(AppType::CHROME_APP));
+ window->SetProperty(aura::client::kAppType,
+ static_cast<int>(AppType::CHROME_APP));
pointer_metrics_recorder_->OnPointerEventObserved(pointer_event, gfx::Point(),
target.get());
histogram_tester_->ExpectBucketCount(kDestinationHistogramName, 2, 1);
- window->SetAppType(static_cast<int>(AppType::ARC_APP));
+ window->SetProperty(aura::client::kAppType,
+ static_cast<int>(AppType::ARC_APP));
pointer_metrics_recorder_->OnPointerEventObserved(pointer_event, gfx::Point(),
target.get());
histogram_tester_->ExpectBucketCount(kDestinationHistogramName, 3, 1);
« no previous file with comments | « ash/metrics/pointer_metrics_recorder.cc ('k') | ash/metrics/user_metrics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698