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

Unified Diff: chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc

Issue 2885153004: React to primary display change instead of removal (Closed)
Patch Set: Workaround DisplayConfigurationController display switch limiter 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
Index: chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc b/chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc
index 517ec783ae834b9125449de84635e146ed66bfe4..acf074ae225fd6af55f93ded65c3882bc3763420 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_display_chooser_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/display/display_configuration_controller.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
+#include "base/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/display/display.h"
#include "ui/display/display_observer.h"
@@ -63,6 +64,7 @@ TEST_F(OobeDisplayChooserTest, PreferTouchAsPrimary) {
EXPECT_EQ(ids[0], GetPrimaryDisplay());
display_chooser.TryToPlaceUiOnTouchDisplay();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(ids[1], GetPrimaryDisplay());
}
@@ -77,6 +79,7 @@ TEST_F(OobeDisplayChooserTest, AddingSecondTouchDisplayShouldbeNOP) {
EXPECT_EQ(ids[0], GetPrimaryDisplay());
display_chooser.TryToPlaceUiOnTouchDisplay();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(ids[0], GetPrimaryDisplay());
oshima 2017/05/17 16:56:18 can you add another test case where the primary di
Felix Ekblom 2017/05/18 11:12:04 I'm not sure I understand what this would test. I
Felix Ekblom 2017/05/22 14:40:53 I've added a test now that trigger the bad behavio
}

Powered by Google App Engine
This is Rietveld 408576698