summaryrefslogtreecommitdiffstats
path: root/core/modules/breakpoint
diff options
context:
space:
mode:
authorAlex Pott2015-02-11 16:12:46 +0000
committerAlex Pott2015-02-11 16:12:46 +0000
commitdbb32f2e18d3b1b79bbe50335ca93da8ea9ed382 (patch)
tree39f0fb1c44b4fbe4e625ac710085738ff3b6296a /core/modules/breakpoint
parent45268c11b3a4ed88a7f08fd7e4405c59d3003a7a (diff)
Issue #2260061 by Jelle_S, attiks, Wim Leers, mdrummond, mgifford, holist: Responsive image module does not support sizes/picture polyfill 2.2
Diffstat (limited to 'core/modules/breakpoint')
-rw-r--r--core/modules/breakpoint/src/Tests/BreakpointDiscoveryTest.php98
-rw-r--r--core/modules/breakpoint/tests/modules/breakpoint_module_test/breakpoint_module_test.breakpoints.yml6
-rw-r--r--core/modules/breakpoint/tests/src/Unit/BreakpointTest.php4
-rw-r--r--core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.breakpoints.yml14
4 files changed, 61 insertions, 61 deletions
diff --git a/core/modules/breakpoint/src/Tests/BreakpointDiscoveryTest.php b/core/modules/breakpoint/src/Tests/BreakpointDiscoveryTest.php
index a8a46f9..83986eb 100644
--- a/core/modules/breakpoint/src/Tests/BreakpointDiscoveryTest.php
+++ b/core/modules/breakpoint/src/Tests/BreakpointDiscoveryTest.php
@@ -33,54 +33,54 @@ class BreakpointDiscoveryTest extends KernelTestBase {
public function testThemeBreakpoints() {
// Verify the breakpoint group for breakpoint_theme_test was created.
$expected_breakpoints = array(
- 'breakpoint_theme_test.mobile' => array(
- 'label' => 'mobile',
- 'mediaQuery' => '(min-width: 0px)',
- 'weight' => 0,
- 'multipliers' => array(
- '1x',
- ),
- 'provider' => 'breakpoint_theme_test',
- 'id' => 'breakpoint_theme_test.mobile',
- 'group' => 'breakpoint_theme_test',
- 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ 'breakpoint_theme_test.tv' => array(
+ 'label' => 'tv',
+ 'mediaQuery' => 'only screen and (min-width: 1220px)',
+ 'weight' => 0,
+ 'multipliers' => array(
+ '1x',
),
- 'breakpoint_theme_test.narrow' => array(
- 'label' => 'narrow',
- 'mediaQuery' => '(min-width: 560px)',
- 'weight' => 1,
- 'multipliers' => array(
- '1x',
- ),
- 'provider' => 'breakpoint_theme_test',
- 'id' => 'breakpoint_theme_test.narrow',
- 'group' => 'breakpoint_theme_test',
- 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ 'provider' => 'breakpoint_theme_test',
+ 'id' => 'breakpoint_theme_test.tv',
+ 'group' => 'breakpoint_theme_test',
+ 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ ),
+ 'breakpoint_theme_test.wide' => array(
+ 'label' => 'wide',
+ 'mediaQuery' => '(min-width: 851px)',
+ 'weight' => 1,
+ 'multipliers' => array(
+ '1x',
),
- 'breakpoint_theme_test.wide' => array(
- 'label' => 'wide',
- 'mediaQuery' => '(min-width: 851px)',
- 'weight' => 2,
- 'multipliers' => array(
- '1x',
- ),
- 'provider' => 'breakpoint_theme_test',
- 'id' => 'breakpoint_theme_test.wide',
- 'group' => 'breakpoint_theme_test',
- 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ 'provider' => 'breakpoint_theme_test',
+ 'id' => 'breakpoint_theme_test.wide',
+ 'group' => 'breakpoint_theme_test',
+ 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ ),
+ 'breakpoint_theme_test.narrow' => array(
+ 'label' => 'narrow',
+ 'mediaQuery' => '(min-width: 560px)',
+ 'weight' => 2,
+ 'multipliers' => array(
+ '1x',
),
- 'breakpoint_theme_test.tv' => array(
- 'label' => 'tv',
- 'mediaQuery' => 'only screen and (min-width: 3456px)',
- 'weight' => 3,
- 'multipliers' => array(
- '1x',
- ),
- 'provider' => 'breakpoint_theme_test',
- 'id' => 'breakpoint_theme_test.tv',
- 'group' => 'breakpoint_theme_test',
- 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ 'provider' => 'breakpoint_theme_test',
+ 'id' => 'breakpoint_theme_test.narrow',
+ 'group' => 'breakpoint_theme_test',
+ 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ ),
+ 'breakpoint_theme_test.mobile' => array(
+ 'label' => 'mobile',
+ 'mediaQuery' => '(min-width: 0px)',
+ 'weight' => 3,
+ 'multipliers' => array(
+ '1x',
),
+ 'provider' => 'breakpoint_theme_test',
+ 'id' => 'breakpoint_theme_test.mobile',
+ 'group' => 'breakpoint_theme_test',
+ 'class' => 'Drupal\\breakpoint\\Breakpoint',
+ ),
);
$breakpoints = \Drupal::service('breakpoint.manager')->getBreakpointsByGroup('breakpoint_theme_test');
@@ -101,7 +101,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
'breakpoint_theme_test.group2.narrow' => array(
'label' => 'narrow',
'mediaQuery' => '(min-width: 560px)',
- 'weight' => 1,
+ 'weight' => 2,
'multipliers' => array(
'1x',
'2x',
@@ -114,7 +114,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
'breakpoint_theme_test.group2.wide' => array(
'label' => 'wide',
'mediaQuery' => '(min-width: 851px)',
- 'weight' => 2,
+ 'weight' => 1,
'multipliers' => array(
'1x',
'2x',
@@ -127,7 +127,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
'breakpoint_module_test.breakpoint_theme_test.group2.tv' => array(
'label' => 'tv',
'mediaQuery' => '(min-width: 6000px)',
- 'weight' => 3,
+ 'weight' => 0,
'multipliers' => array(
'1x',
),
@@ -152,7 +152,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
'breakpoint_module_test.mobile' => array(
'label' => 'mobile',
'mediaQuery' => '(min-width: 0px)',
- 'weight' => 0,
+ 'weight' => 1,
'multipliers' => array(
'1x',
),
@@ -164,7 +164,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
'breakpoint_module_test.standard' => array(
'label' => 'standard',
'mediaQuery' => '(min-width: 560px)',
- 'weight' => 1,
+ 'weight' => 0,
'multipliers' => array(
'1x',
'2x',
diff --git a/core/modules/breakpoint/tests/modules/breakpoint_module_test/breakpoint_module_test.breakpoints.yml b/core/modules/breakpoint/tests/modules/breakpoint_module_test/breakpoint_module_test.breakpoints.yml
index 0c24709..e1edeb2 100644
--- a/core/modules/breakpoint/tests/modules/breakpoint_module_test/breakpoint_module_test.breakpoints.yml
+++ b/core/modules/breakpoint/tests/modules/breakpoint_module_test/breakpoint_module_test.breakpoints.yml
@@ -1,12 +1,12 @@
breakpoint_module_test.mobile:
label: mobile
mediaQuery: '(min-width: 0px)'
- weight: 0
+ weight: 1
# Don't include multipliers. A 1x multiplier this will be enforced by default.
breakpoint_module_test.standard:
label: standard
mediaQuery: '(min-width: 560px)'
- weight: 1
+ weight: 0
# Don't include a 1x multiplier this will be enforced by default.
multipliers:
- 2x
@@ -15,7 +15,7 @@ breakpoint_module_test.standard:
breakpoint_module_test.breakpoint_theme_test.group2.tv:
label: tv
mediaQuery: '(min-width: 6000px)'
- weight: 3
+ weight: 0
multipliers:
- 1x
group: breakpoint_theme_test.group2
diff --git a/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php b/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php
index f4b2a0b..fea2d8f 100644
--- a/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php
+++ b/core/modules/breakpoint/tests/src/Unit/BreakpointTest.php
@@ -87,9 +87,9 @@ class BreakpointTest extends UnitTestCase {
* @covers ::getMediaQuery
*/
public function testGetMediaQuery() {
- $this->pluginDefinition['mediaQuery'] = 'only screen and (min-width: 3456px)';
+ $this->pluginDefinition['mediaQuery'] = 'only screen and (min-width: 1220px)';
$this->setupBreakpoint();
- $this->assertEquals('only screen and (min-width: 3456px)', $this->breakpoint->getMediaQuery());
+ $this->assertEquals('only screen and (min-width: 1220px)', $this->breakpoint->getMediaQuery());
}
/**
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.breakpoints.yml b/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.breakpoints.yml
index 6d34ec7..3e565e1 100644
--- a/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.breakpoints.yml
+++ b/core/modules/breakpoint/tests/themes/breakpoint_theme_test/breakpoint_theme_test.breakpoints.yml
@@ -1,32 +1,32 @@
breakpoint_theme_test.mobile:
label: mobile
mediaQuery: '(min-width: 0px)'
- weight: 0
+ weight: 3
multipliers:
- 1x
breakpoint_theme_test.narrow:
label: narrow
mediaQuery: '(min-width: 560px)'
- weight: 1
+ weight: 2
multipliers:
- 1x
# Out of order breakpoint to test sorting.
breakpoint_theme_test.tv:
label: tv
- mediaQuery: 'only screen and (min-width: 3456px)'
- weight: 3
+ mediaQuery: 'only screen and (min-width: 1220px)'
+ weight: 0
multipliers:
- 1x
breakpoint_theme_test.wide:
label: wide
mediaQuery: '(min-width: 851px)'
- weight: 2
+ weight: 1
multipliers:
- 1x
breakpoint_theme_test.group2.narrow:
label: narrow
mediaQuery: '(min-width: 560px)'
- weight: 1
+ weight: 2
multipliers:
- 1x
- 2x
@@ -34,7 +34,7 @@ breakpoint_theme_test.group2.narrow:
breakpoint_theme_test.group2.wide:
label: wide
mediaQuery: '(min-width: 851px)'
- weight: 2
+ weight: 1
multipliers:
- 1x
- 2x