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

Side by Side Diff: chrome/browser/cocoa/animatable_image_unittest.mm

Issue 3169030: Change the conditions on which the popup blocked animation is shown to be more reliable. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix compile Created 10 years, 3 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/nsimage_cache_mac.h" 7 #import "base/nsimage_cache_mac.h"
8 #import "chrome/browser/cocoa/animatable_image.h" 8 #import "chrome/browser/cocoa/animatable_image.h"
9 #import "chrome/browser/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/cocoa/cocoa_test_helper.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 15 matching lines...) Expand all
26 26
27 TEST_F(AnimatableImageTest, BasicAnimation) { 27 TEST_F(AnimatableImageTest, BasicAnimation) {
28 [animation_ setStartFrame:CGRectMake(0, 0, 10, 10)]; 28 [animation_ setStartFrame:CGRectMake(0, 0, 10, 10)];
29 [animation_ setEndFrame:CGRectMake(500, 500, 100, 100)]; 29 [animation_ setEndFrame:CGRectMake(500, 500, 100, 100)];
30 [animation_ setStartOpacity:0.1]; 30 [animation_ setStartOpacity:0.1];
31 [animation_ setEndOpacity:1.0]; 31 [animation_ setEndOpacity:1.0];
32 [animation_ setDuration:0.5]; 32 [animation_ setDuration:0.5];
33 [animation_ startAnimation]; 33 [animation_ startAnimation];
34 } 34 }
35 35
36 TEST_F(AnimatableImageTest, CancelAnimation) {
37 [animation_ setStartFrame:CGRectMake(0, 0, 10, 10)];
38 [animation_ setEndFrame:CGRectMake(500, 500, 100, 100)];
39 [animation_ setStartOpacity:0.1];
40 [animation_ setEndOpacity:1.0];
41 [animation_ setDuration:5.0]; // Long enough to be able to test cancelling.
42 [animation_ startAnimation];
43 [animation_ close];
Nico 2010/08/31 15:14:54 this just checks that nothing crashes in the cance
Robert Sesek 2010/08/31 15:15:52 Correct.
44 }
45
36 } // namespace 46 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698