| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual void TearDown() | 42 virtual void TearDown() |
| 43 { | 43 { |
| 44 m_cell->destroy(); | 44 m_cell->destroy(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 LayoutTableCell* m_cell; | 47 LayoutTableCell* m_cell; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // TODO(esprehn): Disabled all of these tests because they're flaky: crbug.com/6
30625 | 50 TEST_F(LayoutTableCellDeathTest, CanSetColumn) |
| 51 TEST_F(LayoutTableCellDeathTest, DISABLED_CanSetColumn) | |
| 52 { | 51 { |
| 53 static const unsigned columnIndex = 10; | 52 static const unsigned columnIndex = 10; |
| 54 m_cell->setAbsoluteColumnIndex(columnIndex); | 53 m_cell->setAbsoluteColumnIndex(columnIndex); |
| 55 EXPECT_EQ(columnIndex, m_cell->absoluteColumnIndex()); | 54 EXPECT_EQ(columnIndex, m_cell->absoluteColumnIndex()); |
| 56 } | 55 } |
| 57 | 56 |
| 58 TEST_F(LayoutTableCellDeathTest, DISABLED_CanSetColumnToMaxColumnIndex) | 57 TEST_F(LayoutTableCellDeathTest, CanSetColumnToMaxColumnIndex) |
| 59 { | 58 { |
| 60 m_cell->setAbsoluteColumnIndex(maxColumnIndex); | 59 m_cell->setAbsoluteColumnIndex(maxColumnIndex); |
| 61 EXPECT_EQ(maxColumnIndex, m_cell->absoluteColumnIndex()); | 60 EXPECT_EQ(maxColumnIndex, m_cell->absoluteColumnIndex()); |
| 62 } | 61 } |
| 63 | 62 |
| 64 // FIXME: Re-enable these tests once ASSERT_DEATH is supported for Android. | 63 // FIXME: Re-enable these tests once ASSERT_DEATH is supported for Android. |
| 65 // See: https://bugs.webkit.org/show_bug.cgi?id=74089 | 64 // See: https://bugs.webkit.org/show_bug.cgi?id=74089 |
| 66 #if !OS(ANDROID) | 65 // TODO(dgrogan): These tests started flaking on Mac try bots around 2016-07-28. |
| 66 // https://crbug.com/632816 |
| 67 #if !OS(ANDROID) && !OS(MACOSX) |
| 67 | 68 |
| 68 TEST_F(LayoutTableCellDeathTest, DISABLED_CrashIfColumnOverflowOnSetting) | 69 TEST_F(LayoutTableCellDeathTest, CrashIfColumnOverflowOnSetting) |
| 69 { | 70 { |
| 70 ASSERT_DEATH(m_cell->setAbsoluteColumnIndex(maxColumnIndex + 1), ""); | 71 ASSERT_DEATH(m_cell->setAbsoluteColumnIndex(maxColumnIndex + 1), ""); |
| 71 } | 72 } |
| 72 | 73 |
| 73 TEST_F(LayoutTableCellDeathTest, DISABLED_CrashIfSettingUnsetColumnIndex) | 74 TEST_F(LayoutTableCellDeathTest, CrashIfSettingUnsetColumnIndex) |
| 74 { | 75 { |
| 75 ASSERT_DEATH(m_cell->setAbsoluteColumnIndex(unsetColumnIndex), ""); | 76 ASSERT_DEATH(m_cell->setAbsoluteColumnIndex(unsetColumnIndex), ""); |
| 76 } | 77 } |
| 77 | 78 |
| 78 #endif | 79 #endif |
| 79 | 80 |
| 80 using LayoutTableCellTest = RenderingTest; | 81 using LayoutTableCellTest = RenderingTest; |
| 81 | 82 |
| 82 TEST_F(LayoutTableCellTest, ResetColspanIfTooBig) | 83 TEST_F(LayoutTableCellTest, ResetColspanIfTooBig) |
| 83 { | 84 { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 document().view()->updateAllLifecyclePhases(); | 142 document().view()->updateAllLifecyclePhases(); |
| 142 | 143 |
| 143 // Check that overflow was calculated on the cell. | 144 // Check that overflow was calculated on the cell. |
| 144 LayoutBlock* inputBlock = toLayoutBlock(getLayoutObjectByElementId("cell")); | 145 LayoutBlock* inputBlock = toLayoutBlock(getLayoutObjectByElementId("cell")); |
| 145 LayoutRect rect = inputBlock->localOverflowRectForPaintInvalidation(); | 146 LayoutRect rect = inputBlock->localOverflowRectForPaintInvalidation(); |
| 146 EXPECT_EQ(rect, LayoutRect(-1, -1, 24, 24)); | 147 EXPECT_EQ(rect, LayoutRect(-1, -1, 24, 24)); |
| 147 } | 148 } |
| 148 } // namespace | 149 } // namespace |
| 149 | 150 |
| 150 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |