File: display-override-member-app-region-window-controls-overlay-manual.tentative.html

package info (click to toggle)
firefox 144.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,637,504 kB
  • sloc: cpp: 7,576,692; javascript: 6,430,831; ansic: 3,748,119; python: 1,398,978; xml: 628,810; asm: 438,679; java: 186,194; sh: 63,212; makefile: 19,159; objc: 13,086; perl: 12,986; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 53; csh: 10
file content (73 lines) | stat: -rw-r--r-- 2,378 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>

<head>
  <title>Test app-region CSS property when "window-controls-overlay" in display-override member</title>
  <link rel="manifest" href="resources/display-override-member-app-region-window-controls-overlay.webmanifest" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <h1>Test app-region CSS property when "window-controls-overlay" in display-override member</h1>
  <style>
    #draggableRectangle {
      app-region: drag;
      background-color: blue;
      position: absolute;
      top: 25px;
      left: 25px;
      width: 250px;
      height: 250px;
      color: white;
    }

    #outerRectangle {
      background-color: green;
      position: relative;
      width: 300px;
      height: 300px;
      text-align: center;
    }

    #innerRectangle {
      app-region: no-drag;
      background-color: red;
      position: absolute;
      top: 50px;
      left: 50px;
      width: 150px;
      height: 150px;
    }
  </style>

  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script src="resources/display-override-member-media-feature-manual.js"></script>

  <script>
    setup({ explicit_timeout: true })
    var manual_test = async_test("app-region element drags window");

    window.addEventListener('DOMContentLoaded', function () {
      document.getElementById('outerRectangle').addEventListener('click', manual_test.unreached_func('click event fired on outer rectangle'));
      document.getElementById('innerRectangle').addEventListener('click', (e) => {e.stopPropagation();}, true);
    });
  </script>
</head>

<body>
  <h1>Description</h1>
  <p>This test validates that an element will drag the window around when running in "window-controls-overlay" mode.</p>
  <h1>Manual Test Steps:</h1>
  <p>
    <ol>
      <li> Install this app, and toggle into "window-controls-overlay" mode.</li>
      <li> Click and drag the blue rectangle containing the text "Drag Me". This element has the app-region:drag CSS property set.</li>
      <li> If the app window moves around as you drag the blue rectangle, <button onclick="manual_test.done()">Click Here</button>.</li>
    </ol>
  </p>
  <div id="outerRectangle">
    <div id="draggableRectangle">
      Drag Me
      <div id="innerRectangle">Not Draggable</div>
    </div>
  </div>
</body>
</html>