OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "platform/LayoutTestSupport.h" | 31 #include "platform/LayoutTestSupport.h" |
32 | 32 |
33 #include "wtf/Assertions.h" | 33 #include "wtf/Assertions.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 static bool s_isRunningLayoutTest = false; | 37 static bool s_isRunningLayoutTest = false; |
38 static bool s_isMockThemeEnabled = false; | 38 static bool s_isMockThemeEnabled = false; |
39 static bool s_isFontAntialiasingEnabled = false; | 39 static bool s_isFontAntialiasingEnabled = false; |
40 static bool s_alwaysUseComplexTextForTest = false; | |
41 | 40 |
42 bool LayoutTestSupport::isRunningLayoutTest() { | 41 bool LayoutTestSupport::isRunningLayoutTest() { |
43 return s_isRunningLayoutTest; | 42 return s_isRunningLayoutTest; |
44 } | 43 } |
45 | 44 |
46 void LayoutTestSupport::setIsRunningLayoutTest(bool value) { | 45 void LayoutTestSupport::setIsRunningLayoutTest(bool value) { |
47 s_isRunningLayoutTest = value; | 46 s_isRunningLayoutTest = value; |
48 } | 47 } |
49 | 48 |
50 bool LayoutTestSupport::isMockThemeEnabledForTest() { | 49 bool LayoutTestSupport::isMockThemeEnabledForTest() { |
51 return s_isMockThemeEnabled; | 50 return s_isMockThemeEnabled; |
52 } | 51 } |
53 | 52 |
54 void LayoutTestSupport::setMockThemeEnabledForTest(bool value) { | 53 void LayoutTestSupport::setMockThemeEnabledForTest(bool value) { |
55 ASSERT(s_isRunningLayoutTest); | 54 ASSERT(s_isRunningLayoutTest); |
56 s_isMockThemeEnabled = value; | 55 s_isMockThemeEnabled = value; |
57 } | 56 } |
58 | 57 |
59 bool LayoutTestSupport::isFontAntialiasingEnabledForTest() { | 58 bool LayoutTestSupport::isFontAntialiasingEnabledForTest() { |
60 return s_isFontAntialiasingEnabled; | 59 return s_isFontAntialiasingEnabled; |
61 } | 60 } |
62 | 61 |
63 void LayoutTestSupport::setFontAntialiasingEnabledForTest(bool value) { | 62 void LayoutTestSupport::setFontAntialiasingEnabledForTest(bool value) { |
64 s_isFontAntialiasingEnabled = value; | 63 s_isFontAntialiasingEnabled = value; |
65 } | 64 } |
66 | 65 |
67 bool LayoutTestSupport::alwaysUseComplexTextForTest() { | |
68 return s_alwaysUseComplexTextForTest; | |
69 } | |
70 | |
71 void LayoutTestSupport::setAlwaysUseComplexTextForTest(bool value) { | |
72 s_alwaysUseComplexTextForTest = value; | |
73 } | |
74 | |
75 } // namespace blink | 66 } // namespace blink |
OLD | NEW |