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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 2444563002: cc: Remove "SwapBuffers" naming from LayerTreeHostSingleThreadClient (Closed)
Patch Set: Created 4 years, 2 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: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index 0a58a648e5284b89f852ab5efc38a79a12f0a743..3f12bca1ac47343a78d2afa1996b6498e28df714 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -392,18 +392,15 @@ class NullLayerDelegate : public LayerDelegate {
// Remembers if it has been notified.
class TestCompositorObserver : public CompositorObserver {
public:
- TestCompositorObserver()
- : committed_(false), started_(false), ended_(false), aborted_(false) {}
+ TestCompositorObserver() = default;
bool committed() const { return committed_; }
bool notified() const { return started_ && ended_; }
- bool aborted() const { return aborted_; }
void Reset() {
committed_ = false;
started_ = false;
ended_ = false;
- aborted_ = false;
}
private:
@@ -418,18 +415,13 @@ class TestCompositorObserver : public CompositorObserver {
void OnCompositingEnded(Compositor* compositor) override { ended_ = true; }
- void OnCompositingAborted(Compositor* compositor) override {
- aborted_ = true;
- }
-
void OnCompositingLockStateChanged(Compositor* compositor) override {}
void OnCompositingShuttingDown(Compositor* compositor) override {}
- bool committed_;
- bool started_;
- bool ended_;
- bool aborted_;
+ bool committed_ = false;
+ bool started_ = false;
+ bool ended_ = false;
DISALLOW_COPY_AND_ASSIGN(TestCompositorObserver);
};
@@ -1253,15 +1245,6 @@ TEST_F(LayerWithRealCompositorTest, CompositorObservers) {
WaitForSwap();
EXPECT_TRUE(observer.notified());
- // A change resulting in an aborted swap buffer should alert the observer
- // and also signal an abort.
- observer.Reset();
- l2->SetOpacity(0.1f);
- GetCompositor()->DidAbortSwapBuffers();
- WaitForSwap();
- EXPECT_TRUE(observer.notified());
- EXPECT_TRUE(observer.aborted());
-
GetCompositor()->RemoveObserver(&observer);
// Opacity changes should no longer alert the removed observer.

Powered by Google App Engine
This is Rietveld 408576698