diff --git a/definitions/tasks/L1/raw_cdp/v2_boot_target_get_targets.json b/definitions/tasks/L1/raw_cdp/v2_boot_target_get_targets.json new file mode 100644 index 0000000000000000000000000000000000000000..618f0dd0803b5f87afd53b48c517f57cdf36aa18 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_boot_target_get_targets.json @@ -0,0 +1,77 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Creates a page target then calls Target.getTargets and asserts the returned targetInfos array is non-empty and contains at least one 'page' entry with a targetId. Real semantic probe of getTargets return structure.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.createTarget", + "params": { + "url": "about:blank" + }, + "save_result_as": "created", + "session": "browser" + }, + { + "method": "Target.getTargets", + "params": {}, + "save_result_as": "targets", + "session": "browser" + }, + { + "method": "Target.closeTarget", + "optional": true, + "params": { + "targetId": "{saved:created.targetId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.get_targets", + "cdp.target.create_target" + ], + "grader": { + "checks": [ + { + "kind": "array_length", + "min": 1, + "name": "targets", + "path": "targetInfos" + }, + { + "expected": { + "type": "page" + }, + "kind": "array_contains", + "name": "targets", + "path": "targetInfos" + }, + { + "kind": "saved_path_truthy", + "name": "targets", + "path": "targetInfos.0.targetId" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "coverage.tier1_bootstrap", + "family.bootstrap", + "version.v0_2" + ], + "task_id": "v2_boot_target_get_targets", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Target.getTargets enumerates page targets" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_boot_target_set_discover_targets.json b/definitions/tasks/L1/raw_cdp/v2_boot_target_set_discover_targets.json new file mode 100644 index 0000000000000000000000000000000000000000..2dc353169aeee76166de06a0d4fca4919ac20ed3 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_boot_target_set_discover_targets.json @@ -0,0 +1,81 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Turns on target discovery on the browser session, creates a page target, and waits for the Target.targetCreated event for that exact target id, asserting it describes a 'page'. Real probe that setDiscoverTargets actually opens the discovery event stream.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.setDiscoverTargets", + "params": { + "discover": true + }, + "session": "browser" + }, + { + "method": "Target.createTarget", + "params": { + "url": "about:blank" + }, + "save_result_as": "created", + "session": "browser" + }, + { + "match": { + "targetInfo": { + "targetId": "{saved:created.targetId}" + } + }, + "save_result_as": "discovered", + "session": "browser", + "timeout_ms": 5000, + "wait_for_event": "Target.targetCreated" + }, + { + "method": "Target.closeTarget", + "optional": true, + "params": { + "targetId": "{saved:created.targetId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.set_discover_targets", + "cdp.target.target_created" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Target.targetCreated", + "name": "discovered" + }, + { + "expected": "page", + "kind": "saved_path_equals", + "name": "discovered", + "path": "targetInfo.type" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "coverage.tier1_bootstrap", + "family.bootstrap", + "version.v0_2" + ], + "task_id": "v2_boot_target_set_discover_targets", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Target.setDiscoverTargets emits targetCreated" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_dispatchmouse_geometry.json b/definitions/tasks/L1/raw_cdp/v2_diag_dispatchmouse_geometry.json new file mode 100644 index 0000000000000000000000000000000000000000..f9ad5e95229e564b3bc456c7ebeb3c6cfcfd4a3d --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_dispatchmouse_geometry.json @@ -0,0 +1,72 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. Input.dispatchMouseEvent press+release at CSS coordinate (150,110), the center of a 100x60 target at (100,80). A coordinate hit-test must fire the click handler, recording 'CLICKED@150,110'.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Input.dispatchMouseEvent", + "params": { + "button": "left", + "buttons": 1, + "clickCount": 1, + "type": "mousePressed", + "x": 150, + "y": 110 + } + }, + { + "method": "Input.dispatchMouseEvent", + "params": { + "button": "left", + "buttons": 1, + "clickCount": 1, + "type": "mouseReleased", + "x": 150, + "y": 110 + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__clickInfo", + "returnByValue": true + }, + "save_as": "click" + } + ] + }, + "features": [ + "cdp.input.dispatch_mouse_event", + "web.layout.hit_test" + ], + "grader": { + "checks": [ + { + "expected": "CLICKED@150,110", + "kind": "value_equals", + "name": "click" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/click" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_dispatchmouse_geometry", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Input.dispatchMouseEvent coordinate hit-test" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_domsnapshot_computed_styles.json b/definitions/tasks/L1/raw_cdp/v2_diag_domsnapshot_computed_styles.json new file mode 100644 index 0000000000000000000000000000000000000000..e8c46a6f28c2d4606b0d702f33eb539b4ad5c223 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_domsnapshot_computed_styles.json @@ -0,0 +1,71 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. DOMSnapshot.captureSnapshot with computedStyles:['display','color']; assert the requested computed styles came back: layout.styles is populated and the resolved values ('block' for display, 'rgb(0, 0, 0)' for color) appear in the strings table.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "DOM.enable", + "optional": true + }, + { + "method": "DOMSnapshot.enable", + "optional": true + }, + { + "method": "DOMSnapshot.captureSnapshot", + "params": { + "computedStyles": [ + "display", + "color" + ] + }, + "save_result_as": "snap" + } + ] + }, + "features": [ + "cdp.domsnapshot.capture_snapshot" + ], + "grader": { + "checks": [ + { + "kind": "saved_path_truthy", + "name": "snap", + "path": "documents.0.layout.styles" + }, + { + "expected": "block", + "kind": "array_contains", + "name": "snap", + "path": "strings" + }, + { + "expected": "rgb(0, 0, 0)", + "kind": "array_contains", + "name": "snap", + "path": "strings" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/snapshot" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_domsnapshot_computed_styles", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "DOMSnapshot computedStyles round-trip" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_domsnapshot_shape.json b/definitions/tasks/L1/raw_cdp/v2_diag_domsnapshot_shape.json new file mode 100644 index 0000000000000000000000000000000000000000..3ff31a85dd046aa7e257212c8df509c31184a25f --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_domsnapshot_shape.json @@ -0,0 +1,73 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. DOMSnapshot.captureSnapshot over a known fixture; assert the snapshot shape invariants: exactly one document, a non-empty strings table, and the document exposes parallel layout.nodeIndex and nodes arrays.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "DOM.enable", + "optional": true + }, + { + "method": "DOMSnapshot.enable", + "optional": true + }, + { + "method": "DOMSnapshot.captureSnapshot", + "params": { + "computedStyles": [] + }, + "save_result_as": "snap" + } + ] + }, + "features": [ + "cdp.domsnapshot.capture_snapshot" + ], + "grader": { + "checks": [ + { + "expected": 1, + "kind": "array_length", + "name": "snap", + "path": "documents" + }, + { + "kind": "array_length", + "min": 10, + "name": "snap", + "path": "strings" + }, + { + "kind": "saved_path_truthy", + "name": "snap", + "path": "documents.0.layout.nodeIndex" + }, + { + "kind": "saved_path_truthy", + "name": "snap", + "path": "documents.0.nodes.nodeName" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/snapshot" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_domsnapshot_shape", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "DOMSnapshot.captureSnapshot shape invariants" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_gbcr_fixed.json b/definitions/tasks/L1/raw_cdp/v2_diag_gbcr_fixed.json new file mode 100644 index 0000000000000000000000000000000000000000..dd5a28fb9906675d9409fc7271d0b17efc86f32a --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_gbcr_fixed.json @@ -0,0 +1,49 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] getBoundingClientRect over Runtime.evaluate on a fixed 300x150 element at (0,0) (Defect C root: kernels miscompute layout). Expect exactly '300x150@0,0'.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Runtime.evaluate", + "params": { + "expression": "(function(){var r=document.getElementById('fixed').getBoundingClientRect();return r.width+'x'+r.height+'@'+r.left+','+r.top;})()", + "returnByValue": true + }, + "save_as": "v" + } + ] + }, + "features": [ + "web.layout.bounding_client_rect" + ], + "grader": { + "checks": [ + { + "expected": "300x150@0,0", + "kind": "value_equals", + "name": "v" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/trio" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_gbcr_fixed", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "getBoundingClientRect on fixed-px element" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_getboxmodel_border_box.json b/definitions/tasks/L1/raw_cdp/v2_diag_getboxmodel_border_box.json new file mode 100644 index 0000000000000000000000000000000000000000..ebdb301f9c1da4bb3f9c6910f647111cbbbe7222 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_getboxmodel_border_box.json @@ -0,0 +1,92 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. DOM.getBoxModel on an element with content 200x100, padding 10, border 5. Assert the border box (model width/height 230x130 at origin 400,60) is distinct from the content box (200 wide at origin 415,75), proving content/padding/border box separation.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "DOM.enable", + "optional": true + }, + { + "method": "DOM.getDocument", + "params": { + "depth": -1 + }, + "save_result_as": "doc" + }, + { + "method": "DOM.querySelector", + "params": { + "nodeId": "{saved:doc.root.nodeId}", + "selector": "#padbox" + }, + "save_result_as": "q" + }, + { + "method": "DOM.getBoxModel", + "params": { + "nodeId": "{saved:q.nodeId}" + }, + "save_result_as": "box" + } + ] + }, + "features": [ + "cdp.dom.get_box_model" + ], + "grader": { + "checks": [ + { + "expected": 230, + "kind": "saved_path_equals", + "name": "box", + "path": "model.width" + }, + { + "expected": 130, + "kind": "saved_path_equals", + "name": "box", + "path": "model.height" + }, + { + "expected": 400, + "kind": "saved_path_equals", + "name": "box", + "path": "model.border.0" + }, + { + "expected": 415, + "kind": "saved_path_equals", + "name": "box", + "path": "model.content.0" + }, + { + "expected": 615, + "kind": "saved_path_equals", + "name": "box", + "path": "model.content.2" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/geom" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_getboxmodel_border_box", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "DOM.getBoxModel content vs border box" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_getboxmodel_dims.json b/definitions/tasks/L1/raw_cdp/v2_diag_getboxmodel_dims.json new file mode 100644 index 0000000000000000000000000000000000000000..85545cd65dbab742ad559143e24bf3ee757d5b11 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_getboxmodel_dims.json @@ -0,0 +1,92 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. DOM.getBoxModel on a fixed 240x120 absolutely-positioned element (no border/padding, so content box == border box). Assert model width/height and the content quad coordinates (origin 50,60; far corner 290,180).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "DOM.enable", + "optional": true + }, + { + "method": "DOM.getDocument", + "params": { + "depth": -1 + }, + "save_result_as": "doc" + }, + { + "method": "DOM.querySelector", + "params": { + "nodeId": "{saved:doc.root.nodeId}", + "selector": "#box" + }, + "save_result_as": "q" + }, + { + "method": "DOM.getBoxModel", + "params": { + "nodeId": "{saved:q.nodeId}" + }, + "save_result_as": "box" + } + ] + }, + "features": [ + "cdp.dom.get_box_model" + ], + "grader": { + "checks": [ + { + "expected": 240, + "kind": "saved_path_equals", + "name": "box", + "path": "model.width" + }, + { + "expected": 120, + "kind": "saved_path_equals", + "name": "box", + "path": "model.height" + }, + { + "expected": 8, + "kind": "array_length", + "name": "box", + "path": "model.content" + }, + { + "expected": 50, + "kind": "saved_path_equals", + "name": "box", + "path": "model.content.0" + }, + { + "expected": 290, + "kind": "saved_path_equals", + "name": "box", + "path": "model.content.2" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/geom" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_getboxmodel_dims", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "DOM.getBoxModel geometry on fixed element" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_getcontentquads_shape.json b/definitions/tasks/L1/raw_cdp/v2_diag_getcontentquads_shape.json new file mode 100644 index 0000000000000000000000000000000000000000..2734a4b262272184f4de8f83c125fb1c13f7ca41 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_getcontentquads_shape.json @@ -0,0 +1,86 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. DOM.getContentQuads on a fixed 240x120 element. Assert exactly one quad of 8 coordinates, matching the element rectangle (50,60)-(290,180).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "DOM.enable", + "optional": true + }, + { + "method": "DOM.getDocument", + "params": { + "depth": -1 + }, + "save_result_as": "doc" + }, + { + "method": "DOM.querySelector", + "params": { + "nodeId": "{saved:doc.root.nodeId}", + "selector": "#box" + }, + "save_result_as": "q" + }, + { + "method": "DOM.getContentQuads", + "params": { + "nodeId": "{saved:q.nodeId}" + }, + "save_result_as": "quads" + } + ] + }, + "features": [ + "cdp.dom.get_content_quads" + ], + "grader": { + "checks": [ + { + "expected": 1, + "kind": "array_length", + "name": "quads", + "path": "quads" + }, + { + "expected": 8, + "kind": "array_length", + "name": "quads", + "path": "quads.0" + }, + { + "expected": 50, + "kind": "saved_path_equals", + "name": "quads", + "path": "quads.0.0" + }, + { + "expected": 290, + "kind": "saved_path_equals", + "name": "quads", + "path": "quads.0.2" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/geom" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_getcontentquads_shape", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "DOM.getContentQuads shape on fixed element" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_layoutmetrics_viewport.json b/definitions/tasks/L1/raw_cdp/v2_diag_layoutmetrics_viewport.json new file mode 100644 index 0000000000000000000000000000000000000000..e916b3a08e1915093d6950a862cbdd3fe85adb9c --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_layoutmetrics_viewport.json @@ -0,0 +1,59 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] This method is on the real framework main path (on_framework_main_path); routed to the diagnostic lane per bench policy. Page.getLayoutMetrics viewport consistency: cssLayoutViewport.clientWidth, cssContentSize.width and the (deprecated) layoutViewport.clientWidth must all agree (780 under the pinned Chrome headless viewport).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Page.getLayoutMetrics", + "save_result_as": "lm" + } + ] + }, + "features": [ + "cdp.page.get_layout_metrics", + "web.layout.viewport" + ], + "grader": { + "checks": [ + { + "expected": 780, + "kind": "saved_path_equals", + "name": "lm", + "path": "cssLayoutViewport.clientWidth" + }, + { + "expected": 780, + "kind": "saved_path_equals", + "name": "lm", + "path": "cssContentSize.width" + }, + { + "expected": 780, + "kind": "saved_path_equals", + "name": "lm", + "path": "layoutViewport.clientWidth" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/geom" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_layoutmetrics_viewport", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Page.getLayoutMetrics viewport consistency" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_offset_dims_fixed.json b/definitions/tasks/L1/raw_cdp/v2_diag_offset_dims_fixed.json new file mode 100644 index 0000000000000000000000000000000000000000..ce8297b9fa50ebf865667898e2609e31c05c0e85 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_offset_dims_fixed.json @@ -0,0 +1,49 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] offsetWidth/offsetHeight over Runtime.evaluate on a fixed 300x150 element (Defect C root). Expect exactly '300x150'.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Runtime.evaluate", + "params": { + "expression": "(function(){var e=document.getElementById('fixed');return e.offsetWidth+'x'+e.offsetHeight;})()", + "returnByValue": true + }, + "save_as": "v" + } + ] + }, + "features": [ + "web.layout.offset_dimensions" + ], + "grader": { + "checks": [ + { + "expected": "300x150", + "kind": "value_equals", + "name": "v" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/trio" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_offset_dims_fixed", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "offsetWidth/offsetHeight on fixed-px element" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_diag_scrollsize_fixed.json b/definitions/tasks/L1/raw_cdp/v2_diag_scrollsize_fixed.json new file mode 100644 index 0000000000000000000000000000000000000000..7ccc1a1b52e3f0b45178861c04ccf687d8ea7608 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_diag_scrollsize_fixed.json @@ -0,0 +1,49 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "[diagnostic lane] scrollHeight/scrollWidth over Runtime.evaluate on a 100x50 scroller whose 400x400 inner content sets the scrollable extent (Defect C root). Expect exactly '400x400'.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Runtime.evaluate", + "params": { + "expression": "(function(){var e=document.getElementById('scroller');return e.scrollHeight+'x'+e.scrollWidth;})()", + "returnByValue": true + }, + "save_as": "v" + } + ] + }, + "features": [ + "web.layout.scroll_dimensions" + ], + "grader": { + "checks": [ + { + "expected": "400x400", + "kind": "value_equals", + "name": "v" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/diag/trio" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.diagnostics", + "purpose.diagnostic", + "version.v0_2" + ], + "task_id": "v2_diag_scrollsize_fixed", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "scrollHeight/scrollWidth on overflow container" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_auth_required_e2e.json b/definitions/tasks/L1/raw_cdp/v2_fetch_auth_required_e2e.json new file mode 100644 index 0000000000000000000000000000000000000000..3afb882201fa8d2103cf8c82711ce71c99513156 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_auth_required_e2e.json @@ -0,0 +1,124 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "End-to-end Basic-auth interception: Fetch.enable with handleAuthRequests, a page fetch() hits the 401-challenging /__auth__/ endpoint, Fetch.requestPaused is continued, Fetch.authRequired arrives carrying the Basic challenge, Fetch.continueWithAuth provides credentials, the retried request is continued and the page observes the authenticated 200 body. Closes the last T1_intercept anchor (Fetch.authRequired).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "handleAuthRequests": true, + "patterns": [ + { + "urlPattern": "*__auth__*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "fetch('/__auth__/data').then(function(r){return r.text();}).then(function(t){window.__abbAuth = t;}).catch(function(e){window.__abbAuth = 'ERR:' + String(e);})" + } + }, + { + "save_result_as": "paused1", + "session": "page", + "timeout_ms": 5000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused1.requestId}" + } + }, + { + "save_result_as": "challenge", + "session": "page", + "timeout_ms": 5000, + "wait_for_event": "Fetch.authRequired" + }, + { + "method": "Fetch.continueWithAuth", + "params": { + "authChallengeResponse": { + "password": "secret", + "response": "ProvideCredentials", + "username": "bench" + }, + "requestId": "{saved:challenge.requestId}" + } + }, + { + "optional": true, + "save_result_as": "paused2", + "session": "page", + "timeout_ms": 5000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "optional": true, + "params": { + "requestId": "{saved:paused2.requestId}" + } + }, + { + "sleep_ms": 600 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbAuth", + "returnByValue": true + }, + "save_as": "fetched" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.auth_required", + "cdp.fetch.continue_with_auth", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.authRequired", + "name": "challenge" + }, + { + "kind": "saved_path_truthy", + "name": "challenge", + "path": "authChallenge.scheme" + }, + { + "expected": "granted", + "kind": "value_contains", + "name": "fetched" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/l1/core" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_auth_required_e2e", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.authRequired end-to-end Basic auth challenge" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_continue_request_modify_headers.json b/definitions/tasks/L1/raw_cdp/v2_fetch_continue_request_modify_headers.json new file mode 100644 index 0000000000000000000000000000000000000000..36496b7e7fc2e5ad70e27a7a72cacfdf40619922 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_continue_request_modify_headers.json @@ -0,0 +1,96 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.continueRequest with an overridden request headers array (injecting x-abb-injected and Accept) still delivers the origin body to the page. Note: the fixture server does not echo request headers, so server-visible header values cannot be asserted here (documented in skipped_fetch.md); this probe covers the continueRequest header-override parameter path end to end.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "headers": [ + { + "name": "x-abb-injected", + "value": "1" + }, + { + "name": "Accept", + "value": "text/plain" + } + ], + "requestId": "{saved:paused.requestId}" + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "REAL-SERVER-BODY", + "kind": "value_contains", + "name": "body" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_continue_request_modify_headers", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.continueRequest with header/method override" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_continue_request_modify_url.json b/definitions/tasks/L1/raw_cdp/v2_fetch_continue_request_modify_url.json new file mode 100644 index 0000000000000000000000000000000000000000..8321ee56182114340de906f3af043c893e604b9c --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_continue_request_modify_url.json @@ -0,0 +1,96 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "The page fetches the 'real' route, but Fetch.continueRequest overrides the request url to a different origin route ('truth'); the server therefore serves the other resource and the page renders the truth body. Proves continueRequest url rewriting reaches the origin.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Runtime.evaluate", + "params": { + "expression": "location.origin+'/v0_2/fetch/abbfetch-truth'", + "returnByValue": true + }, + "save_as": "truthurl" + }, + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused.requestId}", + "url": "{saved:truthurl.result.value}" + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.request_paused", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "ROUTE-TRUTH-BODY", + "kind": "value_contains", + "name": "body" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_continue_request_modify_url", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.continueRequest rewrites the request URL" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_continue_with_auth_probe.json b/definitions/tasks/L1/raw_cdp/v2_fetch_continue_with_auth_probe.json new file mode 100644 index 0000000000000000000000000000000000000000..c6d3d9fb7b24964c238057740d341ea7bfbffcf5 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_continue_with_auth_probe.json @@ -0,0 +1,65 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Structural probe for the auth path: Fetch.enable accepts handleAuthRequests true (auth-handling mode), and Fetch.continueWithAuth is a recognized command that cleanly rejects an invalid interception id. A full Basic-auth challenge (Fetch.authRequired) cannot be produced against the 200-only fixture server; see skipped_fetch.md.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "handleAuthRequests": true, + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "expect_unsupported": true, + "method": "Fetch.continueWithAuth", + "params": { + "authChallengeResponse": { + "password": "p", + "response": "ProvideCredentials", + "username": "u" + }, + "requestId": "abb-nonexistent-000" + } + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.continue_with_auth" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Fetch.continueWithAuth", + "name": "value" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_continue_with_auth_probe", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.enable(handleAuthRequests) + continueWithAuth recognized" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_disable_stops_pausing.json b/definitions/tasks/L1/raw_cdp/v2_fetch_disable_stops_pausing.json new file mode 100644 index 0000000000000000000000000000000000000000..f651afae357477084b3661c4b9c9a51775cfb555 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_disable_stops_pausing.json @@ -0,0 +1,111 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "First proves interception is active (a fetch pauses and is continued). Then Fetch.disable is issued; a second fetch to the same pattern is NOT paused (the optional wait times out and no paused event is captured) and completes normally with the real origin body. Verifies Fetch.disable tears down interception.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused1", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused1.requestId}" + } + }, + { + "sleep_ms": 300 + }, + { + "method": "Fetch.disable" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "optional": true, + "save_result_as": "paused2", + "session": "page", + "timeout_ms": 1500, + "wait_for_event": "Fetch.requestPaused" + }, + { + "sleep_ms": 300 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body2" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.disable" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused1" + }, + { + "expected": null, + "kind": "saved_path_equals", + "name": "paused2", + "path": null + }, + { + "expected": "REAL-SERVER-BODY", + "kind": "value_contains", + "name": "body2" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_disable_stops_pausing", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.disable stops further requestPaused events" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_enable_no_patterns.json b/definitions/tasks/L1/raw_cdp/v2_fetch_enable_no_patterns.json new file mode 100644 index 0000000000000000000000000000000000000000..db598ffb3a6c21a835debf4369472368df613f98 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_enable_no_patterns.json @@ -0,0 +1,79 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.enable called with no patterns (intercept every request). A single page fetch() is paused, then released with Fetch.continueRequest; the page receives the real origin body. Contrasts with the pattern-scoped enable and exercises the pattern-less interception form.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": {} + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused.requestId}" + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "REAL-SERVER-BODY", + "kind": "value_contains", + "name": "body" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_enable_no_patterns", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.enable() without patterns intercepts all requests" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_enable_patterns_continue.json b/definitions/tasks/L1/raw_cdp/v2_fetch_enable_patterns_continue.json new file mode 100644 index 0000000000000000000000000000000000000000..d0153c8a5c5a8682fb3b80427929c893a5bd17ad --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_enable_patterns_continue.json @@ -0,0 +1,104 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.enable with a URL pattern at requestStage Request; a page fetch() triggers Fetch.requestPaused; the driver inspects the paused request fields and lets it through unchanged with Fetch.continueRequest, so the page receives the real origin body. Covers enable+patterns, Request stage, requestPaused field semantics, and plain continueRequest.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused.requestId}" + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.request_paused", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "kind": "saved_path_truthy", + "name": "paused", + "path": "requestId" + }, + { + "expected": "abbfetch-real", + "kind": "saved_path_contains", + "name": "paused", + "path": "request.url" + }, + { + "expected": "GET", + "kind": "saved_path_equals", + "name": "paused", + "path": "request.method" + }, + { + "expected": "REAL-SERVER-BODY", + "kind": "value_contains", + "name": "body" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_enable_patterns_continue", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.enable(patterns, Request) + continueRequest passthrough" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_fail_request.json b/definitions/tasks/L1/raw_cdp/v2_fetch_fail_request.json new file mode 100644 index 0000000000000000000000000000000000000000..de785c02ca739fdd17a588d71796527c2f6de2a3 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_fail_request.json @@ -0,0 +1,87 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.failRequest with errorReason BlockedByClient aborts the paused request; the page's fetch() promise rejects and stores an ERR marker. Verifies failRequest surfaces as a network error to the page.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.failRequest", + "params": { + "errorReason": "BlockedByClient", + "requestId": "{saved:paused.requestId}" + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fail_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "ERR:", + "kind": "value_contains", + "name": "body" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_fail_request", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.failRequest(BlockedByClient) rejects the request" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_fail_request_alt_reason.json b/definitions/tasks/L1/raw_cdp/v2_fetch_fail_request_alt_reason.json new file mode 100644 index 0000000000000000000000000000000000000000..d3b61b4c5ab70bef8d31f3586122760c4c376309 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_fail_request_alt_reason.json @@ -0,0 +1,87 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "A second failRequest error-reason probe: errorReason ConnectionRefused also aborts the request and rejects the page fetch() promise. Confirms distinct Fetch.failRequest error codes route to a page-visible network failure.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.failRequest", + "params": { + "errorReason": "ConnectionRefused", + "requestId": "{saved:paused.requestId}" + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbBody", + "returnByValue": true + }, + "save_as": "body" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fail_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "ERR:", + "kind": "value_contains", + "name": "body" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_fail_request_alt_reason", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.failRequest(ConnectionRefused) error semantics" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_custom_response.json b/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_custom_response.json new file mode 100644 index 0000000000000000000000000000000000000000..1144e59c9a692d7a6c50713a2c2c405cff836e44 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_custom_response.json @@ -0,0 +1,108 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.fulfillRequest injects a synthetic response: status 201, a custom x-abb-tag header, and a text body. The page reads back the status code, the custom header value, and the body, proving all three fulfillRequest response fields take effect.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "RlVMRklMTEVELUJPRFktdG9rZW4tZWNobw==", + "requestId": "{saved:paused.requestId}", + "responseCode": 201, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "text/plain" + }, + { + "name": "x-abb-tag", + "value": "hdr-echo-77" + } + ] + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbStatus+'|'+window.__abbXTag+'|'+window.__abbBody", + "returnByValue": true + }, + "save_as": "combo" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "201", + "kind": "value_contains", + "name": "combo" + }, + { + "expected": "hdr-echo-77", + "kind": "value_contains", + "name": "combo" + }, + { + "expected": "FULFILLED-BODY-token-echo", + "kind": "value_contains", + "name": "combo" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_fulfill_custom_response", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.fulfillRequest with custom code, headers and body" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_json.json b/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_json.json new file mode 100644 index 0000000000000000000000000000000000000000..ec8e80ac89656f08c3b32c55b0238d6a38d4d2af --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_json.json @@ -0,0 +1,94 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.fulfillRequest returns a JSON body with an application/json content type; the page JSON.parses it and reads a field. Verifies fulfillRequest can mock a JSON API response the origin never produced.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "eyJhbnN3ZXIiOiJNT0NLRURfTElWRV9BTlNXRVIifQ==", + "requestId": "{saved:paused.requestId}", + "responseCode": 200, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "application/json" + } + ] + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "JSON.parse(window.__abbBody).answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "MOCKED_LIVE_ANSWER", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_fulfill_json", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.fulfillRequest returns synthetic JSON" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_status_override_404.json b/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_status_override_404.json new file mode 100644 index 0000000000000000000000000000000000000000..6cc6ad6afda793c8b570bd500510dc92b0652767 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_fulfill_status_override_404.json @@ -0,0 +1,99 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.fulfillRequest returns a non-2xx status (404) with a custom body for a route that would otherwise return 200; the page observes status 404 and the injected body. Covers fulfillRequest response-code override semantics.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "bm90LWhlcmUtNDA0LWJvZHk=", + "requestId": "{saved:paused.requestId}", + "responseCode": 404, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "text/plain" + } + ] + } + }, + { + "sleep_ms": 400 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbStatus+'|'+window.__abbBody", + "returnByValue": true + }, + "save_as": "combo" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "404", + "kind": "value_contains", + "name": "combo" + }, + { + "expected": "not-here-404-body", + "kind": "value_contains", + "name": "combo" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_fulfill_status_override_404", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.fulfillRequest overrides status to 404" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_load_network_resource.json b/definitions/tasks/L1/raw_cdp/v2_fetch_load_network_resource.json new file mode 100644 index 0000000000000000000000000000000000000000..bc846e3f10c89823d905be77093eeef989a566ba --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_load_network_resource.json @@ -0,0 +1,99 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Network.loadNetworkResource fetches an origin resource out-of-band for a given frameId; the returned resource reports success, httpStatusCode 200, and an IO stream handle that IO.read drains to the body text. Covers the loadNetworkResource + IO stream read path.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Network.enable" + }, + { + "method": "Page.enable" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "location.origin+'/v0_2/fetch/abbfetch-real'", + "returnByValue": true + }, + "save_as": "realurl" + }, + { + "method": "Page.getFrameTree", + "save_result_as": "ft" + }, + { + "method": "Network.loadNetworkResource", + "params": { + "frameId": "{saved:ft.frameTree.frame.id}", + "options": { + "disableCache": true, + "includeCredentials": false + }, + "url": "{saved:realurl.result.value}" + }, + "save_result_as": "lnr" + }, + { + "method": "IO.read", + "params": { + "handle": "{saved:lnr.resource.stream}", + "size": 4096 + }, + "save_result_as": "lread" + }, + { + "method": "IO.close", + "params": { + "handle": "{saved:lnr.resource.stream}" + } + } + ] + }, + "features": [ + "cdp.network.load_network_resource", + "cdp.io.read", + "cdp.io.close" + ], + "grader": { + "checks": [ + { + "expected": true, + "kind": "saved_path_equals", + "name": "lnr", + "path": "resource.success" + }, + { + "expected": 200, + "kind": "saved_path_equals", + "name": "lnr", + "path": "resource.httpStatusCode" + }, + { + "expected": "REAL-SERVER-BODY", + "kind": "saved_path_contains", + "name": "lread", + "path": "data" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_load_network_resource", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Network.loadNetworkResource streams a resource" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_network_get_response_body.json b/definitions/tasks/L1/raw_cdp/v2_fetch_network_get_response_body.json new file mode 100644 index 0000000000000000000000000000000000000000..2f64a6c869e2e8dbae533aea6b7a791a49b52c46 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_network_get_response_body.json @@ -0,0 +1,83 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "With the Network domain enabled, a page fetch() drives Network.responseReceived (captures requestId) and Network.loadingFinished; Network.getResponseBody then returns the decoded body (base64Encoded false for text). Covers Network.getResponseBody plus the responseReceived/loadingFinished events.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Network.enable" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "resp", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Network.responseReceived" + }, + { + "optional": true, + "save_result_as": "fin", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Network.loadingFinished" + }, + { + "method": "Network.getResponseBody", + "params": { + "requestId": "{saved:resp.requestId}" + }, + "save_result_as": "rb" + } + ] + }, + "features": [ + "cdp.network.get_response_body", + "cdp.network.response_received", + "cdp.network.loading_finished" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Network.responseReceived", + "name": "resp" + }, + { + "expected": "REAL-SERVER-BODY", + "kind": "saved_path_contains", + "name": "rb", + "path": "body" + }, + { + "expected": false, + "kind": "saved_path_equals", + "name": "rb", + "path": "base64Encoded" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_network_get_response_body", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Network.getResponseBody after loadingFinished" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_network_relative_ordering.json b/definitions/tasks/L1/raw_cdp/v2_fetch_network_relative_ordering.json new file mode 100644 index 0000000000000000000000000000000000000000..91c6ff95fe7f04ce5d79810391215cda948f8f71 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_network_relative_ordering.json @@ -0,0 +1,90 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "With both Fetch (Request stage) and Network enabled, a fetch pauses first (Fetch.requestPaused); only after Fetch.continueRequest does the origin respond and Network.responseReceived fire. Asserts the observed-event order: requestPaused is index 0, responseReceived follows.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Network.enable" + }, + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused.requestId}" + } + }, + { + "save_result_as": "resp", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Network.responseReceived" + } + ] + }, + "features": [ + "cdp.fetch.request_paused", + "cdp.network.response_received" + ], + "grader": { + "checks": [ + { + "expected": "Fetch.requestPaused", + "kind": "saved_path_equals", + "name": "__events_observed__", + "path": "0" + }, + { + "kind": "event_observed", + "method": "Network.responseReceived", + "name": "resp" + }, + { + "kind": "saved_path_truthy", + "name": "resp", + "path": "requestId" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_network_relative_ordering", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.requestPaused precedes Network.responseReceived" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_request_paused_request_stage_fields.json b/definitions/tasks/L1/raw_cdp/v2_fetch_request_paused_request_stage_fields.json new file mode 100644 index 0000000000000000000000000000000000000000..cde34ac0ccd383696a4f1d612f10f9e7c061b98b --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_request_paused_request_stage_fields.json @@ -0,0 +1,93 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "At requestStage Request, asserts the Fetch.requestPaused event carries requestId, frameId, request.method GET and request.url, and that responseStatusCode is absent (null) because the response has not been received yet. The request is released with continueRequest.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*abbfetch-real*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-real?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused.requestId}" + } + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.request_paused" + ], + "grader": { + "checks": [ + { + "kind": "saved_path_truthy", + "name": "paused", + "path": "requestId" + }, + { + "kind": "saved_path_truthy", + "name": "paused", + "path": "frameId" + }, + { + "expected": "GET", + "kind": "saved_path_equals", + "name": "paused", + "path": "request.method" + }, + { + "expected": "abbfetch-real", + "kind": "saved_path_contains", + "name": "paused", + "path": "request.url" + }, + { + "expected": null, + "kind": "saved_path_equals", + "name": "paused", + "path": "responseStatusCode" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_request_paused_request_stage_fields", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Fetch.requestPaused field semantics at Request stage" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_fetch_response_stage_take_stream.json b/definitions/tasks/L1/raw_cdp/v2_fetch_response_stage_take_stream.json new file mode 100644 index 0000000000000000000000000000000000000000..82b8d66d143e2d90f0050650622d6d3e11d91330 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_fetch_response_stage_take_stream.json @@ -0,0 +1,121 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "Fetch.enable at requestStage Response pauses after the response is available (requestPaused carries responseStatusCode 200). Fetch.takeResponseBodyAsStream returns an IO stream handle; IO.read pulls the body text, a second IO.read reaches eof, and IO.close releases the handle. Covers the streaming response-body read path.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Response", + "urlPattern": "*abbfetch-big*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbGet(location.origin+'/v0_2/fetch/abbfetch-big?n='+Date.now())" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.takeResponseBodyAsStream", + "params": { + "requestId": "{saved:paused.requestId}" + }, + "save_result_as": "stream" + }, + { + "method": "IO.read", + "params": { + "handle": "{saved:stream.stream}", + "size": 4096 + }, + "save_result_as": "read1" + }, + { + "method": "IO.read", + "params": { + "handle": "{saved:stream.stream}", + "size": 4096 + }, + "save_result_as": "read2" + }, + { + "method": "IO.close", + "params": { + "handle": "{saved:stream.stream}" + } + }, + { + "method": "Fetch.failRequest", + "optional": true, + "params": { + "errorReason": "Aborted", + "requestId": "{saved:paused.requestId}" + } + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.take_response_body_as_stream", + "cdp.io.read", + "cdp.io.close" + ], + "grader": { + "checks": [ + { + "expected": 200, + "kind": "saved_path_equals", + "name": "paused", + "path": "responseStatusCode" + }, + { + "kind": "saved_path_truthy", + "name": "stream", + "path": "stream" + }, + { + "expected": "STREAM-CHUNK", + "kind": "saved_path_contains", + "name": "read1", + "path": "data" + }, + { + "expected": true, + "kind": "saved_path_equals", + "name": "read2", + "path": "eof" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/fetch/page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch", + "version.v0_2" + ], + "task_id": "v2_fetch_response_stage_take_stream", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Response-stage takeResponseBodyAsStream + IO.read/close" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_h_compute_product.json b/definitions/tasks/L1/raw_cdp/v2_h_compute_product.json new file mode 100644 index 0000000000000000000000000000000000000000..bb5eafa0e23fa3eebb5db1bf67952d5c5439ba4a --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_h_compute_product.json @@ -0,0 +1,120 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Builds a child page session via the dialect handshake, navigates to a compute fixture, clicks the compute button via Runtime.evaluate, and reads the page-computed result (a*b+7 from body data attributes => 6*7+7 = 49). The answer emerges from the runtime computation, not a literal in the markup.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.setAutoAttach", + "params": { + "autoAttach": true, + "flatten": true, + "waitForDebuggerOnStart": true + }, + "session": "browser" + }, + { + "method": "Target.createTarget", + "params": { + "url": "{fixture_url}" + }, + "save_result_as": "created", + "session": "browser" + }, + { + "match": { + "targetInfo": { + "targetId": "{saved:created.targetId}" + } + }, + "save_result_as": "attached", + "save_session_as": "h_page", + "timeout_ms": 6000, + "wait_for_event": "Target.attachedToTarget" + }, + { + "method": "Page.enable", + "session": "h_page" + }, + { + "method": "Page.setLifecycleEventsEnabled", + "params": { + "enabled": true + }, + "session": "h_page" + }, + { + "method": "Runtime.enable", + "session": "h_page" + }, + { + "method": "Runtime.runIfWaitingForDebugger", + "session": "h_page" + }, + { + "match": { + "name": "load" + }, + "save_result_as": "loaded", + "session": "h_page", + "timeout_ms": 8000, + "wait_for_event": "Page.lifecycleEvent" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "document.getElementById('go').click(); Number(document.getElementById('result').textContent);", + "returnByValue": true + }, + "save_as": "answer", + "session": "h_page" + }, + { + "method": "Target.closeTarget", + "optional": true, + "params": { + "targetId": "{saved:created.targetId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.attached_to_target", + "cdp.runtime.run_if_waiting_for_debugger", + "cdp.page.lifecycle_event" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Page.lifecycleEvent", + "name": "loaded" + }, + { + "expected": 49, + "kind": "value_equals", + "name": "answer" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/h/compute" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.handwritten", + "version.v0_2" + ], + "task_id": "v2_h_compute_product", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 40000, + "task_ms": 25000 + }, + "title": "bootstrap replay -> data-attribute product" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_h_counter_clicks.json b/definitions/tasks/L1/raw_cdp/v2_h_counter_clicks.json new file mode 100644 index 0000000000000000000000000000000000000000..350dfa0a79b20c9786a3a87c8c5e5c0651c8981a --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_h_counter_clicks.json @@ -0,0 +1,120 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Builds a flat child page session via the dialect handshake, navigates to a counter fixture, drives a click sequence (three +3 clicks and two +5 clicks) via Runtime.evaluate on the child session, and reads back the running total. The answer (19) emerges only from the interaction; it is not present as a literal in the fixture HTML/JS.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.setAutoAttach", + "params": { + "autoAttach": true, + "flatten": true, + "waitForDebuggerOnStart": true + }, + "session": "browser" + }, + { + "method": "Target.createTarget", + "params": { + "url": "{fixture_url}" + }, + "save_result_as": "created", + "session": "browser" + }, + { + "match": { + "targetInfo": { + "targetId": "{saved:created.targetId}" + } + }, + "save_result_as": "attached", + "save_session_as": "h_page", + "timeout_ms": 6000, + "wait_for_event": "Target.attachedToTarget" + }, + { + "method": "Page.enable", + "session": "h_page" + }, + { + "method": "Page.setLifecycleEventsEnabled", + "params": { + "enabled": true + }, + "session": "h_page" + }, + { + "method": "Runtime.enable", + "session": "h_page" + }, + { + "method": "Runtime.runIfWaitingForDebugger", + "session": "h_page" + }, + { + "match": { + "name": "load" + }, + "save_result_as": "loaded", + "session": "h_page", + "timeout_ms": 8000, + "wait_for_event": "Page.lifecycleEvent" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "for(var i=0;i<3;i++){document.getElementById('add3').click();} for(var j=0;j<2;j++){document.getElementById('add5').click();} Number(document.getElementById('total').textContent);", + "returnByValue": true + }, + "save_as": "answer", + "session": "h_page" + }, + { + "method": "Target.closeTarget", + "optional": true, + "params": { + "targetId": "{saved:created.targetId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.attached_to_target", + "cdp.runtime.run_if_waiting_for_debugger", + "cdp.page.lifecycle_event" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Page.lifecycleEvent", + "name": "loaded" + }, + { + "expected": 19, + "kind": "value_equals", + "name": "answer" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/h/counter" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.handwritten", + "version.v0_2" + ], + "task_id": "v2_h_counter_clicks", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 40000, + "task_ms": 25000 + }, + "title": "bootstrap replay -> counter interaction" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_h_form_checksum.json b/definitions/tasks/L1/raw_cdp/v2_h_form_checksum.json new file mode 100644 index 0000000000000000000000000000000000000000..129fb07ab6a107aab5b01df6656c9349115af651 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_h_form_checksum.json @@ -0,0 +1,135 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Builds a child page session via the dialect handshake, navigates to a form fixture, focuses the input and types via Input.insertText, clicks compute, and reads the page-computed checksum (sum of char codes mod 1000). The answer (317 for 'abz') is computed by the page from the typed value, not stored as a literal.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.setAutoAttach", + "params": { + "autoAttach": true, + "flatten": true, + "waitForDebuggerOnStart": true + }, + "session": "browser" + }, + { + "method": "Target.createTarget", + "params": { + "url": "{fixture_url}" + }, + "save_result_as": "created", + "session": "browser" + }, + { + "match": { + "targetInfo": { + "targetId": "{saved:created.targetId}" + } + }, + "save_result_as": "attached", + "save_session_as": "h_page", + "timeout_ms": 6000, + "wait_for_event": "Target.attachedToTarget" + }, + { + "method": "Page.enable", + "session": "h_page" + }, + { + "method": "Page.setLifecycleEventsEnabled", + "params": { + "enabled": true + }, + "session": "h_page" + }, + { + "method": "Runtime.enable", + "session": "h_page" + }, + { + "method": "Runtime.runIfWaitingForDebugger", + "session": "h_page" + }, + { + "match": { + "name": "load" + }, + "save_result_as": "loaded", + "session": "h_page", + "timeout_ms": 8000, + "wait_for_event": "Page.lifecycleEvent" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "document.getElementById('name').focus();", + "returnByValue": true + }, + "session": "h_page" + }, + { + "method": "Input.insertText", + "params": { + "text": "abz" + }, + "session": "h_page" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "document.getElementById('compute').click(); Number(document.getElementById('out').textContent);", + "returnByValue": true + }, + "save_as": "answer", + "session": "h_page" + }, + { + "method": "Target.closeTarget", + "optional": true, + "params": { + "targetId": "{saved:created.targetId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.attached_to_target", + "cdp.runtime.run_if_waiting_for_debugger", + "cdp.input.insert_text" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Page.lifecycleEvent", + "name": "loaded" + }, + { + "expected": 317, + "kind": "value_equals", + "name": "answer" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/h/form" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.handwritten", + "version.v0_2" + ], + "task_id": "v2_h_form_checksum", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 40000, + "task_ms": 25000 + }, + "title": "bootstrap replay -> typed-value checksum" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_h_frame_token.json b/definitions/tasks/L1/raw_cdp/v2_h_frame_token.json new file mode 100644 index 0000000000000000000000000000000000000000..3a68bdbee4660ca8e77fe11afd4c0516c1cb01e5 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_h_frame_token.json @@ -0,0 +1,127 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Builds a child page session via the dialect handshake, navigates to a parent fixture with a same-origin iframe, verifies the child frame appears in Page.getFrameTree, and reads the token that the child frame computes from a data attribute (reversed 'xy9' => '9yx'). The answer is derived by the child frame at runtime, not a static literal.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.setAutoAttach", + "params": { + "autoAttach": true, + "flatten": true, + "waitForDebuggerOnStart": true + }, + "session": "browser" + }, + { + "method": "Target.createTarget", + "params": { + "url": "{fixture_url}" + }, + "save_result_as": "created", + "session": "browser" + }, + { + "match": { + "targetInfo": { + "targetId": "{saved:created.targetId}" + } + }, + "save_result_as": "attached", + "save_session_as": "h_page", + "timeout_ms": 6000, + "wait_for_event": "Target.attachedToTarget" + }, + { + "method": "Page.enable", + "session": "h_page" + }, + { + "method": "Page.setLifecycleEventsEnabled", + "params": { + "enabled": true + }, + "session": "h_page" + }, + { + "method": "Runtime.enable", + "session": "h_page" + }, + { + "method": "Runtime.runIfWaitingForDebugger", + "session": "h_page" + }, + { + "match": { + "name": "load" + }, + "save_result_as": "loaded", + "session": "h_page", + "timeout_ms": 8000, + "wait_for_event": "Page.lifecycleEvent" + }, + { + "method": "Page.getFrameTree", + "params": {}, + "save_result_as": "tree", + "session": "h_page" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.frames[0].document.getElementById('ctoken').textContent;", + "returnByValue": true + }, + "save_as": "answer", + "session": "h_page" + }, + { + "method": "Target.closeTarget", + "optional": true, + "params": { + "targetId": "{saved:created.targetId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.attached_to_target", + "cdp.page.get_frame_tree", + "cdp.runtime.run_if_waiting_for_debugger" + ], + "grader": { + "checks": [ + { + "kind": "array_length", + "min": 1, + "name": "tree", + "path": "frameTree.childFrames" + }, + { + "expected": "9yx", + "kind": "value_equals", + "name": "answer" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/h/frames_parent" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.handwritten", + "version.v0_2" + ], + "task_id": "v2_h_frame_token", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 40000, + "task_ms": 25000 + }, + "title": "bootstrap replay -> cross-frame token read" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_block_resource_fallback.json b/definitions/tasks/L1/raw_cdp/v2_ifx_block_resource_fallback.json new file mode 100644 index 0000000000000000000000000000000000000000..fe493cbbae589d387b53c45f555daa1e47eac456 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_block_resource_fallback.json @@ -0,0 +1,87 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "The app requests /api-primary; the driver failRequest(BlockedByClient) blocks it, and the page's catch/fallback path renders a local FALLBACK_LOCAL_42 value. Proves resource blocking activates the client fallback branch.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-primary*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbWithFallback(location.origin+'/v0_2/ifx/api-primary','FALLBACK_LOCAL_42')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.failRequest", + "params": { + "errorReason": "BlockedByClient", + "requestId": "{saved:paused.requestId}" + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fail_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "FALLBACK_LOCAL_42", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_block_resource_fallback", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Blocked resource triggers client fallback" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_header_rewrite_client.json b/definitions/tasks/L1/raw_cdp/v2_ifx_header_rewrite_client.json new file mode 100644 index 0000000000000000000000000000000000000000..1980aa74afee27c77c62aa8a3fc6c18bf5671ad0 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_header_rewrite_client.json @@ -0,0 +1,98 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "fulfillRequest returns a custom x-abb-token response header; the app reads response.headers and renders the injected token. Covers client-observable response-header rewriting. (Server-visible request-header injection is not observable via the fixture server; see skipped_fetch.md.)", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-answer*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbHeader(location.origin+'/v0_2/ifx/api-answer','x-abb-token')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "b2s=", + "requestId": "{saved:paused.requestId}", + "responseCode": 200, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "text/plain" + }, + { + "name": "x-abb-token", + "value": "injected-token-xyz" + } + ] + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "injected-token-xyz", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_header_rewrite_client", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Injected response header observed by the client" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_json_field_inject.json b/definitions/tasks/L1/raw_cdp/v2_ifx_json_field_inject.json new file mode 100644 index 0000000000000000000000000000000000000000..f3ecfb63f4b90cf72047aa3d4dbf35394850a5ac --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_json_field_inject.json @@ -0,0 +1,94 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "The app reads the 'secret' field from /api-answer; the origin JSON has no such field. fulfillRequest returns JSON containing secret=INJECTED_FIELD_VALUE and the page renders it. Proves field-level response fabrication.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-answer*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbApiField(location.origin+'/v0_2/ifx/api-answer','secret')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "eyJhbnN3ZXIiOiJ4Iiwic2VjcmV0IjoiSU5KRUNURURfRklFTERfVkFMVUUifQ==", + "requestId": "{saved:paused.requestId}", + "responseCode": 200, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "application/json" + } + ] + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "INJECTED_FIELD_VALUE", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_json_field_inject", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Inject a JSON field the origin never returns" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_mock_api_rewrite.json b/definitions/tasks/L1/raw_cdp/v2_ifx_mock_api_rewrite.json new file mode 100644 index 0000000000000000000000000000000000000000..98f6a332c4771700ae5cde45b5e068806129acfb --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_mock_api_rewrite.json @@ -0,0 +1,95 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "End-to-end mock: the app fetches /api-answer (origin serves {\"answer\":\"SERVER_DECOY_SECRET\"}); the driver intercepts at Request stage and fulfillRequest returns {\"answer\":\"MOCKED_LIVE_ANSWER\"}. The page renders the mocked answer, which does not exist on the origin route, proving the interception superseded the server value. Mechanism trace: Fetch.requestPaused observed.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-answer*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbApiField(location.origin+'/v0_2/ifx/api-answer')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "eyJhbnN3ZXIiOiJNT0NLRURfTElWRV9BTlNXRVIifQ==", + "requestId": "{saved:paused.requestId}", + "responseCode": 200, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "application/json" + } + ] + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.request_paused", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "MOCKED_LIVE_ANSWER", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_mock_api_rewrite", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Mock API rewrite: fulfilled JSON supersedes origin" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_multi_intercept.json b/definitions/tasks/L1/raw_cdp/v2_ifx_multi_intercept.json new file mode 100644 index 0000000000000000000000000000000000000000..adfa535ecfd1634a0abdc82c6a1f92f9ac124409 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_multi_intercept.json @@ -0,0 +1,116 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "The app issues two concurrent fetches (/api-answer and /api-second), both matched by patterns. The driver fulfills the first paused request with FULFILLED_ONE and continues the second to the origin. Verifies independent handling of multiple paused requests by requestId.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-answer*" + }, + { + "requestStage": "Request", + "urlPattern": "*ifx/api-second*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbTwo(location.origin+'/v0_2/ifx/api-answer', location.origin+'/v0_2/ifx/api-second')" + } + }, + { + "save_result_as": "p1", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "eyJhbnN3ZXIiOiJGVUxGSUxMRURfT05FIn0=", + "requestId": "{saved:p1.requestId}", + "responseCode": 200, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "application/json" + } + ] + } + }, + { + "save_result_as": "p2", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:p2.requestId}" + } + }, + { + "sleep_ms": 600 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "String(window.__a)+'|'+String(window.__b)", + "returnByValue": true + }, + "save_as": "combo" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "p1" + }, + { + "kind": "saved_path_truthy", + "name": "p2", + "path": "requestId" + }, + { + "expected": "FULFILLED_ONE", + "kind": "value_contains", + "name": "combo" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_multi_intercept", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Two concurrent requests: one fulfilled, one continued" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_request_rewrite_url.json b/definitions/tasks/L1/raw_cdp/v2_ifx_request_rewrite_url.json new file mode 100644 index 0000000000000000000000000000000000000000..dc27d7b9136c26c23a4f13e42533119ecbd14a85 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_request_rewrite_url.json @@ -0,0 +1,95 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "The app fetches /api-answer (origin: SERVER_DECOY_SECRET); Fetch.continueRequest rewrites the url to /api-truth, so the origin actually serves REWRITTEN_TRUTH_ROUTE and the page renders it. Proves URL rewriting changes which origin resource the server delivers.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Runtime.evaluate", + "params": { + "expression": "location.origin+'/v0_2/ifx/api-truth'", + "returnByValue": true + }, + "save_as": "truthurl" + }, + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-answer*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbApiField(location.origin+'/v0_2/ifx/api-answer')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.continueRequest", + "params": { + "requestId": "{saved:paused.requestId}", + "url": "{saved:truthurl.result.value}" + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.continue_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "REWRITTEN_TRUTH_ROUTE", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_request_rewrite_url", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Request URL rewrite redirects to a different origin route" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_response_body_tamper.json b/definitions/tasks/L1/raw_cdp/v2_ifx_response_body_tamper.json new file mode 100644 index 0000000000000000000000000000000000000000..c95551377df6f5a21ec4a16e25e16072b14be0f1 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_response_body_tamper.json @@ -0,0 +1,112 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "At requestStage Response, the driver reads the true origin body via Fetch.getResponseBody (contains the ORIG token), then fulfillRequest replaces it with a TAMPERED/INJECTED body. The page renders the tampered text. Proves the original was observed and then rewritten. It passes when the `Fetch.requestPaused` event is observed; the decoded body in `orig` equals `original-document-body-token-ORIG`, regardless of CDP base64 representation; the saved value `ans` contains `TAMPERED`; the saved value `ans` contains `INJECTED`.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Response", + "urlPattern": "*ifx/doc*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbText(location.origin+'/v0_2/ifx/doc')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.getResponseBody", + "params": { + "requestId": "{saved:paused.requestId}" + }, + "save_result_as": "orig" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "VEFNUEVSRUQtZG9jLWJvZHktSU5KRUNURUQ=", + "requestId": "{saved:paused.requestId}", + "responseCode": 200, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "text/plain" + } + ] + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.get_response_body", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "original-document-body-token-ORIG", + "kind": "saved_body_text_equals", + "name": "orig" + }, + { + "expected": "TAMPERED", + "kind": "value_contains", + "name": "ans" + }, + { + "expected": "INJECTED", + "kind": "value_contains", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_response_body_tamper", + "task_version": 2, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Response-body tamper after reading the origin body" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_ifx_status_override_branch.json b/definitions/tasks/L1/raw_cdp/v2_ifx_status_override_branch.json new file mode 100644 index 0000000000000000000000000000000000000000..f6ad28277698e2978a8d89356be884420163cf49 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_ifx_status_override_branch.json @@ -0,0 +1,94 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "off", + "description": "fulfillRequest returns status 503 for /api-answer; the app's status branch renders DEGRADED_MODE_503 instead of the success path. Proves an injected error status steers client control flow.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Fetch.enable", + "params": { + "patterns": [ + { + "requestStage": "Request", + "urlPattern": "*ifx/api-answer*" + } + ] + } + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__abbStatusBranch(location.origin+'/v0_2/ifx/api-answer')" + } + }, + { + "save_result_as": "paused", + "session": "page", + "timeout_ms": 6000, + "wait_for_event": "Fetch.requestPaused" + }, + { + "method": "Fetch.fulfillRequest", + "params": { + "body": "", + "requestId": "{saved:paused.requestId}", + "responseCode": 503, + "responseHeaders": [ + { + "name": "Content-Type", + "value": "text/plain" + } + ] + } + }, + { + "sleep_ms": 500 + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "window.__answer", + "returnByValue": true + }, + "save_as": "ans" + } + ] + }, + "features": [ + "cdp.fetch.enable", + "cdp.fetch.fulfill_request" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Fetch.requestPaused", + "name": "paused" + }, + { + "expected": "DEGRADED_MODE_503", + "kind": "value_equals", + "name": "ans" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v0_2/ifx/app" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.fetch_intercept", + "version.v0_2" + ], + "task_id": "v2_ifx_status_override_branch", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Injected 503 status drives a degradation branch" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_dom_getboxmodelfornode.json b/definitions/tasks/L1/raw_cdp/v2_neg_dom_getboxmodelfornode.json new file mode 100644 index 0000000000000000000000000000000000000000..467f15666b03771df3c293d70ed22f3bcdbbf03b --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_dom_getboxmodelfornode.json @@ -0,0 +1,46 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative: DOM.getBoxModelForNode does not exist (the real command is DOM.getBoxModel). A misremembered method name must be cleanly rejected as unknown, not silently accepted.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "DOM.getBoxModelForNode", + "params": { + "nodeId": 1 + } + } + ] + }, + "features": [ + "cdp.protocol.unknown_method" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "DOM.getBoxModelForNode" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_dom_getboxmodelfornode", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "dom_getboxmodelfornode" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_emulation_devicemetrics_badwidth.json b/definitions/tasks/L1/raw_cdp/v2_neg_emulation_devicemetrics_badwidth.json new file mode 100644 index 0000000000000000000000000000000000000000..d484211dd956ece4a1cc27b42e600f7df0dc7888 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_emulation_devicemetrics_badwidth.json @@ -0,0 +1,49 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative (bad param type): Emulation.setDeviceMetricsOverride.width must be an integer; passing a string must yield a clean InvalidParams rejection rather than a hang.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Emulation.setDeviceMetricsOverride", + "params": { + "deviceScaleFactor": 1, + "height": 600, + "mobile": false, + "width": "wide" + } + } + ] + }, + "features": [ + "cdp.emulation.set_device_metrics_override" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Emulation.setDeviceMetricsOverride" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_emulation_devicemetrics_badwidth", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "emulation_devicemetrics_badwidth" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_input_dispatchkey_badtype.json b/definitions/tasks/L1/raw_cdp/v2_neg_input_dispatchkey_badtype.json new file mode 100644 index 0000000000000000000000000000000000000000..ee39bf2165b7316eb07421a0ce942e6fdf17a37b --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_input_dispatchkey_badtype.json @@ -0,0 +1,46 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative (bad param type): Input.dispatchKeyEvent.type must be one of the enum strings; passing a number must yield a clean InvalidParams rejection rather than a hang or a synthesized event.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Input.dispatchKeyEvent", + "params": { + "type": 42 + } + } + ] + }, + "features": [ + "cdp.input.dispatch_key_event" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Input.dispatchKeyEvent" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_input_dispatchkey_badtype", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "input_dispatchkey_badtype" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_input_dispatchkey_missing_type.json b/definitions/tasks/L1/raw_cdp/v2_neg_input_dispatchkey_missing_type.json new file mode 100644 index 0000000000000000000000000000000000000000..68d7b3d584ea2068262d7a1e33290fe534b13e5d --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_input_dispatchkey_missing_type.json @@ -0,0 +1,46 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative (missing required param): Input.dispatchKeyEvent requires 'type'; omitting it must yield a clean InvalidParams rejection rather than a hang or a synthesized event.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Input.dispatchKeyEvent", + "params": { + "key": "a" + } + } + ] + }, + "features": [ + "cdp.input.dispatch_key_event" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Input.dispatchKeyEvent" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_input_dispatchkey_missing_type", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "input_dispatchkey_missing_type" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_nonexistent_domain.json b/definitions/tasks/L1/raw_cdp/v2_neg_nonexistent_domain.json new file mode 100644 index 0000000000000000000000000000000000000000..fe2010ff7a159ad45000b44cd44e42f95dd9d65c --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_nonexistent_domain.json @@ -0,0 +1,44 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative: 'Moli' is not a CDP domain and inspectEverything is not a command. A call into a wholly nonexistent domain must be cleanly rejected as unknown.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Moli.inspectEverything", + "params": {} + } + ] + }, + "features": [ + "cdp.protocol.unknown_method" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Moli.inspectEverything" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_nonexistent_domain", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "nonexistent_domain" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_page_deletecookie.json b/definitions/tasks/L1/raw_cdp/v2_neg_page_deletecookie.json new file mode 100644 index 0000000000000000000000000000000000000000..90e5e3c626094d5c696ab5926069f5b7f7dbb694 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_page_deletecookie.json @@ -0,0 +1,47 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative: Page.deleteCookie was removed from the Page domain and relocated to Network.deleteCookies. On a conformant engine it must be cleanly rejected as an unknown method; a hang or crash fails. Declared expect_unsupported so the clean rejection is the passing outcome.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Page.deleteCookie", + "params": { + "cookieName": "x", + "url": "http://127.0.0.1/" + } + } + ] + }, + "features": [ + "cdp.page.delete_cookie.removed" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Page.deleteCookie" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_page_deletecookie", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "page_deletecookie" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_page_navigate_badurl.json b/definitions/tasks/L1/raw_cdp/v2_neg_page_navigate_badurl.json new file mode 100644 index 0000000000000000000000000000000000000000..b48ced069806905ff5144d8cb78890cd0a2ca049 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_page_navigate_badurl.json @@ -0,0 +1,46 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative (bad param type): Page.navigate.url must be a string; passing a number must yield a clean synchronous InvalidParams rejection rather than a hang or a bogus navigation. Declared expect_unsupported (a rejected/InvalidParams outcome passes).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Page.navigate", + "params": { + "url": 123 + } + } + ] + }, + "features": [ + "cdp.page.navigate" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Page.navigate" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_page_navigate_badurl", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "page_navigate_badurl" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_runtime_evaluateexpression.json b/definitions/tasks/L1/raw_cdp/v2_neg_runtime_evaluateexpression.json new file mode 100644 index 0000000000000000000000000000000000000000..8bc4d3ca718aea22edb4da23b311a73af8423673 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_runtime_evaluateexpression.json @@ -0,0 +1,46 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative: Runtime.evaluateExpression is not a real command (the actual command is Runtime.evaluate). A plausible-but-wrong method name must be cleanly rejected as unknown, not silently accepted; a hang or crash fails.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Runtime.evaluateExpression", + "params": { + "expression": "1" + } + } + ] + }, + "features": [ + "cdp.protocol.unknown_method" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Runtime.evaluateExpression" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_runtime_evaluateexpression", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "runtime_evaluateexpression" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_runtime_getproperties_badobjid.json b/definitions/tasks/L1/raw_cdp/v2_neg_runtime_getproperties_badobjid.json new file mode 100644 index 0000000000000000000000000000000000000000..6195834b365cb81589f3bd0b74083d97accc75e4 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_runtime_getproperties_badobjid.json @@ -0,0 +1,46 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative (bad param type): Runtime.getProperties.objectId must be a string RemoteObjectId; passing an integer must yield a clean synchronous InvalidParams rejection rather than a hang. Declared expect_unsupported (a rejected/InvalidParams outcome passes).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Runtime.getProperties", + "params": { + "objectId": 12345 + } + } + ] + }, + "features": [ + "cdp.runtime.get_properties" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Runtime.getProperties" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_runtime_getproperties_badobjid", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "runtime_getproperties_badobjid" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_neg_target_attach_missing_targetid.json b/definitions/tasks/L1/raw_cdp/v2_neg_target_attach_missing_targetid.json new file mode 100644 index 0000000000000000000000000000000000000000..d69af9fece968ee70da481a82df94013b0c941df --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_neg_target_attach_missing_targetid.json @@ -0,0 +1,47 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Negative (missing required param): Target.attachToTarget requires targetId; omitting it must yield a clean InvalidParams rejection on the browser session rather than a hang. Exercises the browser-scope negative path.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "expect_unsupported": true, + "method": "Target.attachToTarget", + "params": { + "flatten": true + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.target.attach_to_target" + ], + "grader": { + "checks": [ + { + "kind": "unsupported_observed", + "method": "Target.attachToTarget" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "about_blank" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.negative", + "purpose.negative", + "version.v0_2" + ], + "task_id": "v2_neg_target_attach_missing_targetid", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "target_attach_missing_targetid" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_t2_browser_cancel_download.json b/definitions/tasks/L1/raw_cdp/v2_t2_browser_cancel_download.json new file mode 100644 index 0000000000000000000000000000000000000000..0acd5d43bd71e33c40f439f78367e96b83dfc7ac --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_t2_browser_cancel_download.json @@ -0,0 +1,106 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Arms download events, triggers a download, captures the guid from Browser.downloadWillBegin, calls Browser.cancelDownload on it, and waits for the matching canceled-or-completed terminal progress event. Asserts both the begin and terminal events; the cancel call is exercised as the coverage probe for cancelDownload. It passes when the `Browser.downloadWillBegin` event is observed; `dwb.guid` is present; the `Browser.downloadProgress` event is observed; `dterminal.state` is one of `[\"canceled\", \"completed\"]`.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Browser.setDownloadBehavior", + "params": { + "behavior": "allowAndName", + "downloadPath": "{artifact_dir}", + "eventsEnabled": true + }, + "session": "browser" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "document.getElementById('dl').click()" + } + }, + { + "save_result_as": "dwb", + "session": "browser", + "timeout_ms": 6000, + "wait_for_event": "Browser.downloadWillBegin" + }, + { + "method": "Browser.cancelDownload", + "optional": true, + "params": { + "guid": "{saved:dwb.guid}" + }, + "session": "browser" + }, + { + "match": { + "guid": "{saved:dwb.guid}", + "state": { + "$one_of": [ + "canceled", + "completed" + ] + } + }, + "save_result_as": "dterminal", + "session": "browser", + "timeout_ms": 6000, + "wait_for_event": "Browser.downloadProgress" + } + ] + }, + "features": [ + "cdp.browser.cancel_download", + "cdp.browser.set_download_behavior", + "cdp.browser.download_will_begin", + "cdp.browser.download_progress" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Browser.downloadWillBegin", + "name": "dwb" + }, + { + "kind": "saved_path_truthy", + "name": "dwb", + "path": "guid" + }, + { + "kind": "event_observed", + "method": "Browser.downloadProgress", + "name": "dterminal" + }, + { + "expected": [ + "canceled", + "completed" + ], + "kind": "saved_path_one_of", + "name": "dterminal", + "path": "state" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/t2b/download_page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.tier2_b", + "version.v0_2" + ], + "task_id": "v2_t2_browser_cancel_download", + "task_version": 2, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Browser.cancelDownload after downloadWillBegin" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_t2_browser_download.json b/definitions/tasks/L1/raw_cdp/v2_t2_browser_download.json new file mode 100644 index 0000000000000000000000000000000000000000..1aa60b10f3ebe60b5353690a79ee23613bd12e3e --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_t2_browser_download.json @@ -0,0 +1,95 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Browser.setDownloadBehavior(allowAndName, eventsEnabled) arms download events, a link click triggers a same-origin file download, and the driver waits for Browser.downloadWillBegin (capturing guid + suggestedFilename) followed by the matching guid's completed Browser.downloadProgress. Asserts the begin event, expected filename, and completed terminal state. It passes when the `Browser.downloadWillBegin` event is observed; `dwb.guid` is present; `dwb.suggestedFilename` contains `report`; the `Browser.downloadProgress` event is observed; the declared `saved_path_equals` check passes.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Browser.setDownloadBehavior", + "params": { + "behavior": "allowAndName", + "downloadPath": "{artifact_dir}", + "eventsEnabled": true + }, + "session": "browser" + }, + { + "method": "Runtime.evaluate", + "params": { + "expression": "document.getElementById('dl').click()" + } + }, + { + "save_result_as": "dwb", + "session": "browser", + "timeout_ms": 6000, + "wait_for_event": "Browser.downloadWillBegin" + }, + { + "match": { + "guid": "{saved:dwb.guid}", + "state": "completed" + }, + "save_result_as": "dprog", + "session": "browser", + "timeout_ms": 6000, + "wait_for_event": "Browser.downloadProgress" + } + ] + }, + "features": [ + "cdp.browser.set_download_behavior", + "cdp.browser.download_will_begin", + "cdp.browser.download_progress" + ], + "grader": { + "checks": [ + { + "kind": "event_observed", + "method": "Browser.downloadWillBegin", + "name": "dwb" + }, + { + "kind": "saved_path_truthy", + "name": "dwb", + "path": "guid" + }, + { + "expected": "report", + "kind": "saved_path_contains", + "name": "dwb", + "path": "suggestedFilename" + }, + { + "kind": "event_observed", + "method": "Browser.downloadProgress", + "name": "dprog" + }, + { + "expected": "completed", + "kind": "saved_path_equals", + "name": "dprog", + "path": "state" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/v2/t2b/download_page" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.tier2_b", + "version.v0_2" + ], + "task_id": "v2_t2_browser_download", + "task_version": 2, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 20000 + }, + "title": "Browser.setDownloadBehavior + downloadWillBegin/downloadProgress events" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_t2_browser_grant_permissions.json b/definitions/tasks/L1/raw_cdp/v2_t2_browser_grant_permissions.json new file mode 100644 index 0000000000000000000000000000000000000000..d81c93e9782ea53ddad7ba7c812dd2541f5d3540 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_t2_browser_grant_permissions.json @@ -0,0 +1,78 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Browser.grantPermissions('geolocation') flips navigator.permissions.query('geolocation').state to 'granted'; Browser.resetPermissions then returns it to 'prompt'. Verifies the permission commands produce a real, observable page-API behaviour change.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Browser.grantPermissions", + "params": { + "permissions": [ + "geolocation" + ] + }, + "session": "browser" + }, + { + "method": "Runtime.evaluate", + "params": { + "awaitPromise": true, + "expression": "navigator.permissions.query({name:'geolocation'}).then(function(p){return p.state;})", + "returnByValue": true + }, + "save_as": "granted" + }, + { + "method": "Browser.resetPermissions", + "params": {}, + "session": "browser" + }, + { + "method": "Runtime.evaluate", + "params": { + "awaitPromise": true, + "expression": "navigator.permissions.query({name:'geolocation'}).then(function(p){return p.state;})", + "returnByValue": true + }, + "save_as": "afterreset" + } + ] + }, + "features": [ + "cdp.browser.grant_permissions", + "cdp.browser.reset_permissions" + ], + "grader": { + "checks": [ + { + "expected": "granted", + "kind": "value_equals", + "name": "granted" + }, + { + "expected": "prompt", + "kind": "value_equals", + "name": "afterreset" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/l1/core" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.tier2_b", + "version.v0_2" + ], + "task_id": "v2_t2_browser_grant_permissions", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Browser.grantPermissions / resetPermissions change page API state" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_t2_browser_set_permission.json b/definitions/tasks/L1/raw_cdp/v2_t2_browser_set_permission.json new file mode 100644 index 0000000000000000000000000000000000000000..6e540de72ddb60a53944064a55b1edda68c79d2c --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_t2_browser_set_permission.json @@ -0,0 +1,65 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Browser.setPermission sets geolocation to 'denied' for the default context; navigator.permissions.query then reports 'denied', confirming the single-permission API path (puppeteer).", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Browser.setPermission", + "params": { + "permission": { + "name": "geolocation" + }, + "setting": "denied" + }, + "session": "browser" + }, + { + "method": "Runtime.evaluate", + "params": { + "awaitPromise": true, + "expression": "navigator.permissions.query({name:'geolocation'}).then(function(p){return p.state;})", + "returnByValue": true + }, + "save_as": "state" + }, + { + "method": "Browser.resetPermissions", + "optional": true, + "params": {}, + "session": "browser" + } + ] + }, + "features": [ + "cdp.browser.set_permission" + ], + "grader": { + "checks": [ + { + "expected": "denied", + "kind": "value_equals", + "name": "state" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/l1/core" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.tier2_b", + "version.v0_2" + ], + "task_id": "v2_t2_browser_set_permission", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Browser.setPermission single-permission override" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_t2_browser_window.json b/definitions/tasks/L1/raw_cdp/v2_t2_browser_window.json new file mode 100644 index 0000000000000000000000000000000000000000..4eda24ebeeb417d07d2145a1795b30f84c904d00 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_t2_browser_window.json @@ -0,0 +1,91 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Resolves the page targetId, then Browser.getWindowForTarget yields a windowId and bounds, Browser.getWindowBounds reads them back, and Browser.setWindowBounds / setContentsSize attempt a resize (best-effort in headless). Asserts a windowId and bounds were returned.", + "driver": { + "kind": "raw_cdp", + "steps": [ + { + "method": "Target.getTargetInfo", + "save_result_as": "ti", + "session": "page" + }, + { + "method": "Browser.getWindowForTarget", + "params": { + "targetId": "{saved:ti.targetInfo.targetId}" + }, + "save_result_as": "win", + "session": "browser" + }, + { + "method": "Browser.getWindowBounds", + "params": { + "windowId": "{saved:win.windowId}" + }, + "save_result_as": "bounds", + "session": "browser" + }, + { + "method": "Browser.setWindowBounds", + "optional": true, + "params": { + "bounds": { + "height": 640, + "width": 900 + }, + "windowId": "{saved:win.windowId}" + }, + "session": "browser" + }, + { + "method": "Browser.setContentsSize", + "optional": true, + "params": { + "height": 620, + "width": 880, + "windowId": "{saved:win.windowId}" + }, + "session": "browser" + } + ] + }, + "features": [ + "cdp.browser.get_window_for_target", + "cdp.browser.get_window_bounds", + "cdp.browser.set_window_bounds", + "cdp.browser.set_contents_size" + ], + "grader": { + "checks": [ + { + "kind": "saved_path_truthy", + "name": "win", + "path": "windowId" + }, + { + "kind": "saved_path_truthy", + "name": "bounds", + "path": "bounds" + } + ], + "kind": "inline_assertions" + }, + "layer": "L1", + "scene": { + "kind": "self_hosted_fixture", + "url": "/l1/core" + }, + "subset_id": "l1.raw_cdp", + "tags": [ + "family.tier2_b", + "version.v0_2" + ], + "task_id": "v2_t2_browser_window", + "task_version": 1, + "timeouts": { + "hard_kill_ms": 30000, + "task_ms": 15000 + }, + "title": "Browser.getWindowForTarget / getWindowBounds / setWindowBounds" +} diff --git a/definitions/tasks/L1/raw_cdp/v2_t2_dom_describenode_objectid.json b/definitions/tasks/L1/raw_cdp/v2_t2_dom_describenode_objectid.json new file mode 100644 index 0000000000000000000000000000000000000000..54bf50b93c31c8099c271865773e79f126812417 --- /dev/null +++ b/definitions/tasks/L1/raw_cdp/v2_t2_dom_describenode_objectid.json @@ -0,0 +1,72 @@ +{ + "artifact_profile": "l1_standard", + "chrome_gate": "best_effort", + "description": "Resolves the #dropdown element to a Runtime objectId, then DOM.describeNode is called by objectId (the puppeteer/agent-browser element-handle path, without a nodeId) with depth to describe the subtree, asserting the backendNodeId and SELECT nodeName plus child